|
@@ -24,9 +24,9 @@ FacilityPageEntity $FacilityPageEntityFromJson(Map<String, dynamic> json) {
|
|
if (totalDeposit != null) {
|
|
if (totalDeposit != null) {
|
|
facilityPageEntity.totalDeposit = totalDeposit;
|
|
facilityPageEntity.totalDeposit = totalDeposit;
|
|
}
|
|
}
|
|
- final List<FacilityPageList>? list = (json['list'] as List<dynamic>?)
|
|
|
|
|
|
+ final List<FacilityDetail>? list = (json['list'] as List<dynamic>?)
|
|
?.map(
|
|
?.map(
|
|
- (e) => jsonConvert.convert<FacilityPageList>(e) as FacilityPageList)
|
|
|
|
|
|
+ (e) => jsonConvert.convert<FacilityDetail>(e) as FacilityDetail)
|
|
.toList();
|
|
.toList();
|
|
if (list != null) {
|
|
if (list != null) {
|
|
facilityPageEntity.list = list;
|
|
facilityPageEntity.list = list;
|
|
@@ -52,7 +52,7 @@ extension FacilityPageEntityExtension on FacilityPageEntity {
|
|
int? limit,
|
|
int? limit,
|
|
int? countPage,
|
|
int? countPage,
|
|
String? totalDeposit,
|
|
String? totalDeposit,
|
|
- List<FacilityPageList>? list,
|
|
|
|
|
|
+ List<FacilityDetail>? list,
|
|
}) {
|
|
}) {
|
|
return FacilityPageEntity()
|
|
return FacilityPageEntity()
|
|
..count = count ?? this.count
|
|
..count = count ?? this.count
|
|
@@ -64,32 +64,32 @@ extension FacilityPageEntityExtension on FacilityPageEntity {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-FacilityPageList $FacilityPageListFromJson(Map<String, dynamic> json) {
|
|
|
|
- final FacilityPageList facilityPageList = FacilityPageList();
|
|
|
|
|
|
+FacilityDetail $FacilityDetailFromJson(Map<String, dynamic> json) {
|
|
|
|
+ final FacilityDetail facilityDetail = FacilityDetail();
|
|
final FacilityPageListBooking? booking = jsonConvert.convert<
|
|
final FacilityPageListBooking? booking = jsonConvert.convert<
|
|
FacilityPageListBooking>(json['booking']);
|
|
FacilityPageListBooking>(json['booking']);
|
|
if (booking != null) {
|
|
if (booking != null) {
|
|
- facilityPageList.booking = booking;
|
|
|
|
|
|
+ facilityDetail.booking = booking;
|
|
}
|
|
}
|
|
final FacilityPageListFacility? facility = jsonConvert.convert<
|
|
final FacilityPageListFacility? facility = jsonConvert.convert<
|
|
FacilityPageListFacility>(json['facility']);
|
|
FacilityPageListFacility>(json['facility']);
|
|
if (facility != null) {
|
|
if (facility != null) {
|
|
- facilityPageList.facility = facility;
|
|
|
|
|
|
+ facilityDetail.facility = facility;
|
|
}
|
|
}
|
|
final FacilityPageListTimePeriod? timePeriod = jsonConvert.convert<
|
|
final FacilityPageListTimePeriod? timePeriod = jsonConvert.convert<
|
|
FacilityPageListTimePeriod>(json['time_period']);
|
|
FacilityPageListTimePeriod>(json['time_period']);
|
|
if (timePeriod != null) {
|
|
if (timePeriod != null) {
|
|
- facilityPageList.timePeriod = timePeriod;
|
|
|
|
|
|
+ facilityDetail.timePeriod = timePeriod;
|
|
}
|
|
}
|
|
final FacilityPageListAccount? account = jsonConvert.convert<
|
|
final FacilityPageListAccount? account = jsonConvert.convert<
|
|
FacilityPageListAccount>(json['account']);
|
|
FacilityPageListAccount>(json['account']);
|
|
if (account != null) {
|
|
if (account != null) {
|
|
- facilityPageList.account = account;
|
|
|
|
|
|
+ facilityDetail.account = account;
|
|
}
|
|
}
|
|
- return facilityPageList;
|
|
|
|
|
|
+ return facilityDetail;
|
|
}
|
|
}
|
|
|
|
|
|
-Map<String, dynamic> $FacilityPageListToJson(FacilityPageList entity) {
|
|
|
|
|
|
+Map<String, dynamic> $FacilityDetailToJson(FacilityDetail entity) {
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
data['booking'] = entity.booking?.toJson();
|
|
data['booking'] = entity.booking?.toJson();
|
|
data['facility'] = entity.facility?.toJson();
|
|
data['facility'] = entity.facility?.toJson();
|
|
@@ -98,14 +98,14 @@ Map<String, dynamic> $FacilityPageListToJson(FacilityPageList entity) {
|
|
return data;
|
|
return data;
|
|
}
|
|
}
|
|
|
|
|
|
-extension FacilityPageListExtension on FacilityPageList {
|
|
|
|
- FacilityPageList copyWith({
|
|
|
|
|
|
+extension FacilityDetailExtension on FacilityDetail {
|
|
|
|
+ FacilityDetail copyWith({
|
|
FacilityPageListBooking? booking,
|
|
FacilityPageListBooking? booking,
|
|
FacilityPageListFacility? facility,
|
|
FacilityPageListFacility? facility,
|
|
FacilityPageListTimePeriod? timePeriod,
|
|
FacilityPageListTimePeriod? timePeriod,
|
|
FacilityPageListAccount? account,
|
|
FacilityPageListAccount? account,
|
|
}) {
|
|
}) {
|
|
- return FacilityPageList()
|
|
|
|
|
|
+ return FacilityDetail()
|
|
..booking = booking ?? this.booking
|
|
..booking = booking ?? this.booking
|
|
..facility = facility ?? this.facility
|
|
..facility = facility ?? this.facility
|
|
..timePeriod = timePeriod ?? this.timePeriod
|
|
..timePeriod = timePeriod ?? this.timePeriod
|
|
@@ -116,6 +116,10 @@ extension FacilityPageListExtension on FacilityPageList {
|
|
FacilityPageListBooking $FacilityPageListBookingFromJson(
|
|
FacilityPageListBooking $FacilityPageListBookingFromJson(
|
|
Map<String, dynamic> json) {
|
|
Map<String, dynamic> json) {
|
|
final FacilityPageListBooking facilityPageListBooking = FacilityPageListBooking();
|
|
final FacilityPageListBooking facilityPageListBooking = FacilityPageListBooking();
|
|
|
|
+ final String? id = jsonConvert.convert<String>(json['id']);
|
|
|
|
+ if (id != null) {
|
|
|
|
+ facilityPageListBooking.id = id;
|
|
|
|
+ }
|
|
final String? date = jsonConvert.convert<String>(json['date']);
|
|
final String? date = jsonConvert.convert<String>(json['date']);
|
|
if (date != null) {
|
|
if (date != null) {
|
|
facilityPageListBooking.date = date;
|
|
facilityPageListBooking.date = date;
|
|
@@ -137,34 +141,45 @@ FacilityPageListBooking $FacilityPageListBookingFromJson(
|
|
if (depositRefund != null) {
|
|
if (depositRefund != null) {
|
|
facilityPageListBooking.depositRefund = depositRefund;
|
|
facilityPageListBooking.depositRefund = depositRefund;
|
|
}
|
|
}
|
|
|
|
+ final String? depositRefundAt = jsonConvert.convert<String>(
|
|
|
|
+ json['deposit_refund_at']);
|
|
|
|
+ if (depositRefundAt != null) {
|
|
|
|
+ facilityPageListBooking.depositRefundAt = depositRefundAt;
|
|
|
|
+ }
|
|
return facilityPageListBooking;
|
|
return facilityPageListBooking;
|
|
}
|
|
}
|
|
|
|
|
|
Map<String, dynamic> $FacilityPageListBookingToJson(
|
|
Map<String, dynamic> $FacilityPageListBookingToJson(
|
|
FacilityPageListBooking entity) {
|
|
FacilityPageListBooking entity) {
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
|
+ data['id'] = entity.id;
|
|
data['date'] = entity.date;
|
|
data['date'] = entity.date;
|
|
data['start'] = entity.start;
|
|
data['start'] = entity.start;
|
|
data['end'] = entity.end;
|
|
data['end'] = entity.end;
|
|
data['deposit_paid'] = entity.depositPaid;
|
|
data['deposit_paid'] = entity.depositPaid;
|
|
data['deposit_refund'] = entity.depositRefund;
|
|
data['deposit_refund'] = entity.depositRefund;
|
|
|
|
+ data['deposit_refund_at'] = entity.depositRefundAt;
|
|
return data;
|
|
return data;
|
|
}
|
|
}
|
|
|
|
|
|
extension FacilityPageListBookingExtension on FacilityPageListBooking {
|
|
extension FacilityPageListBookingExtension on FacilityPageListBooking {
|
|
FacilityPageListBooking copyWith({
|
|
FacilityPageListBooking copyWith({
|
|
|
|
+ String? id,
|
|
String? date,
|
|
String? date,
|
|
String? start,
|
|
String? start,
|
|
String? end,
|
|
String? end,
|
|
String? depositPaid,
|
|
String? depositPaid,
|
|
String? depositRefund,
|
|
String? depositRefund,
|
|
|
|
+ String? depositRefundAt,
|
|
}) {
|
|
}) {
|
|
return FacilityPageListBooking()
|
|
return FacilityPageListBooking()
|
|
|
|
+ ..id = id ?? this.id
|
|
..date = date ?? this.date
|
|
..date = date ?? this.date
|
|
..start = start ?? this.start
|
|
..start = start ?? this.start
|
|
..end = end ?? this.end
|
|
..end = end ?? this.end
|
|
..depositPaid = depositPaid ?? this.depositPaid
|
|
..depositPaid = depositPaid ?? this.depositPaid
|
|
- ..depositRefund = depositRefund ?? this.depositRefund;
|
|
|
|
|
|
+ ..depositRefund = depositRefund ?? this.depositRefund
|
|
|
|
+ ..depositRefundAt = depositRefundAt ?? this.depositRefundAt;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|