You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
1.9 KiB
Dart
65 lines
1.9 KiB
Dart
|
|
|
|
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<String, dynamic> 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<String, dynamic> 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,
|
|
};
|
|
}
|