service days

merge-requests/13/head
mirza.shafique 2 years ago
parent a9e054820a
commit e8fcaaa2a3

@ -65,7 +65,9 @@ class ApiConsts {
static String getServicesOfBranch = "${baseUrlServices}api/ServiceProviders/ServiceProviderService_Get";
static String createSchedule = "${baseUrlServices}api/ServiceProviders/BranchAppointmentSchedule_Create";
static String getSchedule = "${baseUrlServices}api/ServiceProviders/BranchAppointmentSchedule_Get";
static String updateSchedule = "${baseUrlServices}api/ServiceProviders/BranchAppointmentSchedule_Update";
static String createGroup = "${baseUrlServices}api/ServiceProviders/BranchScheduleGroupService_Create";
static String updateGroup = "${baseUrlServices}api/ServiceProviders/BranchScheduleGroupService_Update";
//Advertisement APIs
static String vehicleTypeGet = "${baseUrlServices}api/ServiceProviders/VehicleType_Get";

@ -50,6 +50,7 @@ class ScheduleData {
final String? address;
final String? latitude;
final String? longitude;
final List<WeeklyOffDay>? weeklyOffDays;
final List<ScheduleService>? scheduleServices;
String branchId;
@ -67,6 +68,7 @@ class ScheduleData {
this.address,
this.latitude,
this.longitude,
this.weeklyOffDays,
this.scheduleServices,
this.branchId = "",
});
@ -85,6 +87,7 @@ class ScheduleData {
address: json["address"],
latitude: json["latitude"],
longitude: json["longitude"],
weeklyOffDays: json["weeklyOffDays"] == null ? [] : List<WeeklyOffDay>.from(json["weeklyOffDays"]!.map((x) => WeeklyOffDay.fromJson(x))),
scheduleServices: json["scheduleServices"] == null ? [] : List<ScheduleService>.from(json["scheduleServices"]!.map((x) => ScheduleService.fromJson(x))),
);
@ -125,3 +128,23 @@ class ScheduleService {
"providerServiceName": providerServiceName,
};
}
class WeeklyOffDay {
final int? id;
final int? dayNumber;
WeeklyOffDay({
this.id,
this.dayNumber,
});
factory WeeklyOffDay.fromJson(Map<String, dynamic> json) => WeeklyOffDay(
id: json["id"],
dayNumber: json["dayNumber"],
);
Map<String, dynamic> toJson() => {
"id": id,
"dayNumber": dayNumber,
};
}

Loading…
Cancel
Save