import 'package:mc_common_app/extensions/string_extensions.dart'; import 'package:mc_common_app/utils/enums.dart'; class SpecialServiceModel { int? id; String? name; String? description; double? price; int? specialServiceType; String? specialServiceTypeName; bool? isActive; String? startDate; String? endDate; List
? details; List? office; bool? isDelivery; bool? isSelected; SpecialServiceModel( {this.id, this.name, this.description, this.price, this.specialServiceType, this.specialServiceTypeName, this.isActive, this.startDate, this.endDate, this.details, this.office, this.isSelected, this.isDelivery}); SpecialServiceModel.fromJson(Map json) { id = json['id']; name = json['name']; description = json['description']; price = json['price']; specialServiceType = json['specialServiceType']; specialServiceTypeName = json['specialServiceTypeName']; isActive = json['isActive']; startDate = json['startDate']; endDate = json['endDate']; if (json['details'] != null) { details =
[]; json['details'].forEach((v) { details!.add(Details.fromJson(v)); }); } if (json['office'] != null) { office = []; json['office'].forEach((v) { office!.add(Office.fromJson(v)); }); } isDelivery = json['isDelivery']; isSelected = false; } } class Details { int? id; int? specialServiceID; int? fromcity; int? tocity; int? price; Details({this.id, this.specialServiceID, this.fromcity, this.tocity, this.price}); Details.fromJson(Map json) { id = json['id']; specialServiceID = json['specialServiceID']; fromcity = json['fromcity']; tocity = json['tocity']; price = json['price']; } } class Office { int? id; String? officeAreaName; String? officeAreaNameN; int? cityID; String? city; int? specialServiceID; Office({this.id, this.officeAreaName, this.officeAreaNameN, this.cityID, this.city, this.specialServiceID}); Office.fromJson(Map json) { id = json['id']; officeAreaName = json['officeAreaName']; officeAreaNameN = json['officeAreaNameN']; cityID = json['cityID']; city = json['city']; specialServiceID = json['specialServiceID']; } } class SpecialServiceModelForAds { int? adsID; int? specialServiceID; String? name; String? description; double? price; AppointmentStatusEnum? appointmentStatusEnum; int? appointmentStatusId; String? appointmentDate; SpecialServiceModelForAds({ this.adsID, this.specialServiceID, this.name, this.description, this.price, this.appointmentStatusEnum, this.appointmentDate, this.appointmentStatusId, }); SpecialServiceModelForAds.fromJson(Map json) { adsID = json['adsID']; specialServiceID = json['specialServiceID']; name = json['name']; description = json['description']; price = json['price']; appointmentStatusEnum = (json['appointmentStatus'] as int).toAppointmentStatusEnum(); appointmentDate = json['appointmentDate']; appointmentStatusId = json['appointmentStatus']; } @override String toString() { return 'SpecialServiceModelForAds{adsID: $adsID, specialServiceID: $specialServiceID, name: $name, description: $description, price: $price, appointmentStatusEnum: $appointmentStatusEnum, appointmentStatusId: $appointmentStatusId, appointmentDate: $appointmentDate}'; } }