class ServiceItemModel { final int? id; final String? name; final String? price; final String? manufactureDate; final String? description; final dynamic pictureUrl; final int? companyId; final int? serviceProviderServiceId; final bool? isActive; final bool? isAllowAppointment; final bool? isAppointmentCompanyLoc; final bool? isAppointmentCustomerLoc; bool? isUpdate; ServiceItemModel({ this.id, this.name, this.price, this.manufactureDate, this.description, this.pictureUrl, this.companyId, this.serviceProviderServiceId, this.isActive, this.isAllowAppointment, this.isAppointmentCompanyLoc, this.isAppointmentCustomerLoc, this.isUpdate, }); factory ServiceItemModel.fromJson(Map json) => ServiceItemModel( id: json["id"], name: json["name"], price: json["price"].toString(), manufactureDate: json["manufactureDate"], description: json["description"], pictureUrl: json["pictureUrl"], companyId: json["companyID"], serviceProviderServiceId: json["serviceProviderServiceID"], isActive: json["isActive"], isAllowAppointment: json["isAllowAppointment"], isAppointmentCompanyLoc: json["isAppointmentCompanyLoc"], isAppointmentCustomerLoc: json["isAppointmentCustomerLoc"], isUpdate: false, ); Map toJson() => { "id": id, "name": name, "price": price, "manufactureDate": manufactureDate, "description": description, "pictureUrl": pictureUrl, "companyID": companyId, "serviceProviderServiceID": serviceProviderServiceId, "isActive": isActive, "isAllowAppointment": isAllowAppointment, "isAppointmentCompanyLoc": isAppointmentCompanyLoc, "isAppointmentCustomerLoc": isAppointmentCustomerLoc, }; }