Merge branch 'master' into faiz_development_common
commit
6edcfcd29d
@ -1,61 +1,70 @@
|
|||||||
//TODO: this needs to match with ServiceProviderService from backend side
|
|
||||||
class ServiceModel {
|
class ServiceModel {
|
||||||
final int? providerBranchServiceId;
|
final int? serviceProviderServiceId;
|
||||||
final dynamic providerServiceDescription;
|
final dynamic providerServiceDescription;
|
||||||
final int? serviceCategoryId;
|
final int? categoryId;
|
||||||
|
final String? categoryName;
|
||||||
final int? serviceId;
|
final int? serviceId;
|
||||||
final String? serviceDescription;
|
final String? serviceDescription;
|
||||||
final String? serviceDescriptionN;
|
final String? serviceDescriptionN;
|
||||||
final int? status;
|
final int? serviceStatus;
|
||||||
final dynamic statusText;
|
final dynamic statusText;
|
||||||
final bool? isAllowAppointment;
|
final bool? isAllowAppointment;
|
||||||
|
final bool? isAllowAppointmentHome;
|
||||||
final int? customerLocationRange;
|
final int? customerLocationRange;
|
||||||
|
final String? rangePricePerKm;
|
||||||
final int? itemsCount;
|
final int? itemsCount;
|
||||||
bool isExpanded;
|
bool isExpanded;
|
||||||
|
|
||||||
ServiceModel({
|
ServiceModel({
|
||||||
this.providerBranchServiceId,
|
this.serviceProviderServiceId,
|
||||||
this.providerServiceDescription,
|
this.providerServiceDescription,
|
||||||
this.serviceCategoryId,
|
this.categoryId,
|
||||||
|
this.categoryName,
|
||||||
this.serviceId,
|
this.serviceId,
|
||||||
this.serviceDescription,
|
this.serviceDescription,
|
||||||
this.serviceDescriptionN,
|
this.serviceDescriptionN,
|
||||||
this.status,
|
this.serviceStatus,
|
||||||
this.statusText,
|
this.statusText,
|
||||||
this.isAllowAppointment,
|
this.isAllowAppointment,
|
||||||
|
this.isAllowAppointmentHome,
|
||||||
this.customerLocationRange,
|
this.customerLocationRange,
|
||||||
|
this.rangePricePerKm,
|
||||||
this.itemsCount,
|
this.itemsCount,
|
||||||
required this.isExpanded,
|
required this.isExpanded,
|
||||||
});
|
});
|
||||||
|
|
||||||
factory ServiceModel.fromJson(Map<String, dynamic> json) =>
|
factory ServiceModel.fromJson(Map<String, dynamic> json) => ServiceModel(
|
||||||
ServiceModel(
|
serviceProviderServiceId: json["serviceProviderServiceID"],
|
||||||
providerBranchServiceId: json["providerBranchServiceID"],
|
|
||||||
providerServiceDescription: json["providerServiceDescription"],
|
providerServiceDescription: json["providerServiceDescription"],
|
||||||
serviceCategoryId: json["serviceCategoryID"],
|
categoryId: json["categoryID"],
|
||||||
|
categoryName: json["categoryName"],
|
||||||
serviceId: json["serviceID"],
|
serviceId: json["serviceID"],
|
||||||
serviceDescription: json["serviceDescription"],
|
serviceDescription: json["serviceDescription"] ?? json["serviceName"],
|
||||||
serviceDescriptionN: json["serviceDescriptionN"],
|
serviceDescriptionN: json["serviceDescriptionN"]?? json["serviceNameN"],
|
||||||
status: json["status"],
|
serviceStatus: json["serviceStatus"],
|
||||||
statusText: json["statusText"],
|
statusText: json["statusText"],
|
||||||
isAllowAppointment: json["isAllowAppointment"],
|
isAllowAppointment: json["isAllowAppointment"],
|
||||||
|
isAllowAppointmentHome: json["isAllowAppointmentHome"],
|
||||||
customerLocationRange: json["customerLocationRange"],
|
customerLocationRange: json["customerLocationRange"],
|
||||||
|
rangePricePerKm: json["rangePricePerKm"].toString(),
|
||||||
itemsCount: json["itemsCount"],
|
itemsCount: json["itemsCount"],
|
||||||
isExpanded: false,
|
isExpanded: false,
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> toJson() =>
|
Map<String, dynamic> toJson() => {
|
||||||
{
|
"serviceProviderServiceID": serviceProviderServiceId,
|
||||||
"providerBranchServiceID": providerBranchServiceId,
|
|
||||||
"providerServiceDescription": providerServiceDescription,
|
"providerServiceDescription": providerServiceDescription,
|
||||||
"serviceCategoryID": serviceCategoryId,
|
"categoryID": categoryId,
|
||||||
|
"categoryName": categoryName,
|
||||||
"serviceID": serviceId,
|
"serviceID": serviceId,
|
||||||
"serviceDescription": serviceDescription,
|
"serviceDescription": serviceDescription,
|
||||||
"serviceDescriptionN": serviceDescriptionN,
|
"serviceDescriptionN": serviceDescriptionN,
|
||||||
"status": status,
|
"serviceStatus": serviceStatus,
|
||||||
"statusText": statusText,
|
"statusText": statusText,
|
||||||
"isAllowAppointment": isAllowAppointment,
|
"isAllowAppointment": isAllowAppointment,
|
||||||
|
"isAllowAppointmentHome": isAllowAppointmentHome,
|
||||||
"customerLocationRange": customerLocationRange,
|
"customerLocationRange": customerLocationRange,
|
||||||
|
"rangePricePerKm": rangePricePerKm,
|
||||||
"itemsCount": itemsCount,
|
"itemsCount": itemsCount,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue