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.
71 lines
2.5 KiB
Dart
71 lines
2.5 KiB
Dart
class ServiceModel {
|
|
final int? serviceProviderServiceId;
|
|
final dynamic providerServiceDescription;
|
|
final int? categoryId;
|
|
final String? categoryName;
|
|
final int? serviceId;
|
|
final String? serviceDescription;
|
|
final String? serviceDescriptionN;
|
|
final int? serviceStatus;
|
|
final dynamic statusText;
|
|
final bool? isAllowAppointment;
|
|
final bool? isAllowAppointmentHome;
|
|
final int? customerLocationRange;
|
|
final String? rangePricePerKm;
|
|
final int? itemsCount;
|
|
bool isExpanded;
|
|
|
|
ServiceModel({
|
|
this.serviceProviderServiceId,
|
|
this.providerServiceDescription,
|
|
this.categoryId,
|
|
this.categoryName,
|
|
this.serviceId,
|
|
this.serviceDescription,
|
|
this.serviceDescriptionN,
|
|
this.serviceStatus,
|
|
this.statusText,
|
|
this.isAllowAppointment,
|
|
this.isAllowAppointmentHome,
|
|
this.customerLocationRange,
|
|
this.rangePricePerKm,
|
|
this.itemsCount,
|
|
required this.isExpanded,
|
|
});
|
|
|
|
factory ServiceModel.fromJson(Map<String, dynamic> json) => ServiceModel(
|
|
serviceProviderServiceId: json["serviceProviderServiceID"],
|
|
providerServiceDescription: json["providerServiceDescription"],
|
|
categoryId: json["categoryID"],
|
|
categoryName: json["categoryName"],
|
|
serviceId: json["serviceID"],
|
|
serviceDescription: json["serviceDescription"] ?? json["serviceName"],
|
|
serviceDescriptionN: json["serviceDescriptionN"]?? json["serviceNameN"],
|
|
serviceStatus: json["serviceStatus"],
|
|
statusText: json["statusText"],
|
|
isAllowAppointment: json["isAllowAppointment"],
|
|
isAllowAppointmentHome: json["isAllowAppointmentHome"],
|
|
customerLocationRange: json["customerLocationRange"],
|
|
rangePricePerKm: json["rangePricePerKm"].toString(),
|
|
itemsCount: json["itemsCount"],
|
|
isExpanded: false,
|
|
);
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
"serviceProviderServiceID": serviceProviderServiceId,
|
|
"providerServiceDescription": providerServiceDescription,
|
|
"categoryID": categoryId,
|
|
"categoryName": categoryName,
|
|
"serviceID": serviceId,
|
|
"serviceDescription": serviceDescription,
|
|
"serviceDescriptionN": serviceDescriptionN,
|
|
"serviceStatus": serviceStatus,
|
|
"statusText": statusText,
|
|
"isAllowAppointment": isAllowAppointment,
|
|
"isAllowAppointmentHome": isAllowAppointmentHome,
|
|
"customerLocationRange": customerLocationRange,
|
|
"rangePricePerKm": rangePricePerKm,
|
|
"itemsCount": itemsCount,
|
|
};
|
|
}
|