import 'package:domain/generated/json/base/json_convert_content.dart'; import 'package:domain/entity/service_time_period_entity.dart'; ServiceTimePeriodEntity $ServiceTimePeriodEntityFromJson( Map json) { final ServiceTimePeriodEntity serviceTimePeriodEntity = ServiceTimePeriodEntity(); final String? timeText = jsonConvert.convert(json['time_text']); if (timeText != null) { serviceTimePeriodEntity.timeText = timeText; } final String? time = jsonConvert.convert(json['time']); if (time != null) { serviceTimePeriodEntity.time = time; } final bool? urgent = jsonConvert.convert(json['urgent']); if (urgent != null) { serviceTimePeriodEntity.urgent = urgent; } final bool? holiday = jsonConvert.convert(json['holiday']); if (holiday != null) { serviceTimePeriodEntity.holiday = holiday; } final bool? night = jsonConvert.convert(json['night']); if (night != null) { serviceTimePeriodEntity.night = night; } final bool? enable = jsonConvert.convert(json['enable']); if (enable != null) { serviceTimePeriodEntity.enable = enable; } return serviceTimePeriodEntity; } Map $ServiceTimePeriodEntityToJson( ServiceTimePeriodEntity entity) { final Map data = {}; data['time_text'] = entity.timeText; data['time'] = entity.time; data['urgent'] = entity.urgent; data['holiday'] = entity.holiday; data['night'] = entity.night; data['enable'] = entity.enable; return data; } extension ServiceTimePeriodEntityExtension on ServiceTimePeriodEntity { ServiceTimePeriodEntity copyWith({ String? timeText, String? time, bool? urgent, bool? holiday, bool? night, bool? enable, }) { return ServiceTimePeriodEntity() ..timeText = timeText ?? this.timeText ..time = time ?? this.time ..urgent = urgent ?? this.urgent ..holiday = holiday ?? this.holiday ..night = night ?? this.night ..enable = enable ?? this.enable; } }