|
@@ -1,5 +1,7 @@
|
|
|
import 'package:domain/generated/json/base/json_convert_content.dart';
|
|
|
import 'package:domain/entity/facility_page_entity.dart';
|
|
|
+import 'package:domain/entity/id_name_entity.dart';
|
|
|
+
|
|
|
|
|
|
FacilityPageEntity $FacilityPageEntityFromJson(Map<String, dynamic> json) {
|
|
|
final FacilityPageEntity facilityPageEntity = FacilityPageEntity();
|
|
@@ -75,10 +77,14 @@ FacilityDetail $FacilityDetailFromJson(Map<String, dynamic> json) {
|
|
|
if (timePeriod != null) {
|
|
|
facilityDetail.timePeriod = timePeriod;
|
|
|
}
|
|
|
- final FacilityPageListAccount? account = jsonConvert.convert<FacilityPageListAccount>(json['account']);
|
|
|
+ final IdNameEntity? account = jsonConvert.convert<IdNameEntity>(json['account']);
|
|
|
if (account != null) {
|
|
|
facilityDetail.account = account;
|
|
|
}
|
|
|
+ final FacilityOrder? order = jsonConvert.convert<FacilityOrder>(json['order']);
|
|
|
+ if (order != null) {
|
|
|
+ facilityDetail.order = order;
|
|
|
+ }
|
|
|
return facilityDetail;
|
|
|
}
|
|
|
|
|
@@ -88,6 +94,7 @@ Map<String, dynamic> $FacilityDetailToJson(FacilityDetail entity) {
|
|
|
data['facility'] = entity.facility?.toJson();
|
|
|
data['time_period'] = entity.timePeriod?.toJson();
|
|
|
data['account'] = entity.account?.toJson();
|
|
|
+ data['order'] = entity.order?.toJson();
|
|
|
return data;
|
|
|
}
|
|
|
|
|
@@ -96,13 +103,15 @@ extension FacilityDetailExtension on FacilityDetail {
|
|
|
FacilityPageListBooking? booking,
|
|
|
FacilityPageListFacility? facility,
|
|
|
FacilityPageListTimePeriod? timePeriod,
|
|
|
- FacilityPageListAccount? account,
|
|
|
+ IdNameEntity? account,
|
|
|
+ FacilityOrder? order,
|
|
|
}) {
|
|
|
return FacilityDetail()
|
|
|
..booking = booking ?? this.booking
|
|
|
..facility = facility ?? this.facility
|
|
|
..timePeriod = timePeriod ?? this.timePeriod
|
|
|
- ..account = account ?? this.account;
|
|
|
+ ..account = account ?? this.account
|
|
|
+ ..order = order ?? this.order;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -124,9 +133,9 @@ FacilityPageListBooking $FacilityPageListBookingFromJson(Map<String, dynamic> js
|
|
|
if (end != null) {
|
|
|
facilityPageListBooking.end = end;
|
|
|
}
|
|
|
- final String? depositPaid = jsonConvert.convert<String>(json['deposit_paid']);
|
|
|
- if (depositPaid != null) {
|
|
|
- facilityPageListBooking.depositPaid = depositPaid;
|
|
|
+ final String? deposit = jsonConvert.convert<String>(json['deposit']);
|
|
|
+ if (deposit != null) {
|
|
|
+ facilityPageListBooking.deposit = deposit;
|
|
|
}
|
|
|
final String? depositRefund = jsonConvert.convert<String>(json['deposit_refund']);
|
|
|
if (depositRefund != null) {
|
|
@@ -145,7 +154,7 @@ Map<String, dynamic> $FacilityPageListBookingToJson(FacilityPageListBooking enti
|
|
|
data['date'] = entity.date;
|
|
|
data['start'] = entity.start;
|
|
|
data['end'] = entity.end;
|
|
|
- data['deposit_paid'] = entity.depositPaid;
|
|
|
+ data['deposit'] = entity.deposit;
|
|
|
data['deposit_refund'] = entity.depositRefund;
|
|
|
data['deposit_refund_at'] = entity.depositRefundAt;
|
|
|
return data;
|
|
@@ -157,7 +166,7 @@ extension FacilityPageListBookingExtension on FacilityPageListBooking {
|
|
|
String? date,
|
|
|
String? start,
|
|
|
String? end,
|
|
|
- String? depositPaid,
|
|
|
+ String? deposit,
|
|
|
String? depositRefund,
|
|
|
String? depositRefundAt,
|
|
|
}) {
|
|
@@ -166,7 +175,7 @@ extension FacilityPageListBookingExtension on FacilityPageListBooking {
|
|
|
..date = date ?? this.date
|
|
|
..start = start ?? this.start
|
|
|
..end = end ?? this.end
|
|
|
- ..depositPaid = depositPaid ?? this.depositPaid
|
|
|
+ ..deposit = deposit ?? this.deposit
|
|
|
..depositRefund = depositRefund ?? this.depositRefund
|
|
|
..depositRefundAt = depositRefundAt ?? this.depositRefundAt;
|
|
|
}
|
|
@@ -182,7 +191,7 @@ FacilityPageListFacility $FacilityPageListFacilityFromJson(Map<String, dynamic>
|
|
|
if (name != null) {
|
|
|
facilityPageListFacility.name = name;
|
|
|
}
|
|
|
- final FacilityPageListFacilityType? type = jsonConvert.convert<FacilityPageListFacilityType>(json['type']);
|
|
|
+ final IdNameEntity? type = jsonConvert.convert<IdNameEntity>(json['type']);
|
|
|
if (type != null) {
|
|
|
facilityPageListFacility.type = type;
|
|
|
}
|
|
@@ -201,7 +210,7 @@ extension FacilityPageListFacilityExtension on FacilityPageListFacility {
|
|
|
FacilityPageListFacility copyWith({
|
|
|
String? id,
|
|
|
String? name,
|
|
|
- FacilityPageListFacilityType? type,
|
|
|
+ IdNameEntity? type,
|
|
|
}) {
|
|
|
return FacilityPageListFacility()
|
|
|
..id = id ?? this.id
|
|
@@ -210,37 +219,6 @@ extension FacilityPageListFacilityExtension on FacilityPageListFacility {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-FacilityPageListFacilityType $FacilityPageListFacilityTypeFromJson(Map<String, dynamic> json) {
|
|
|
- final FacilityPageListFacilityType facilityPageListFacilityType = FacilityPageListFacilityType();
|
|
|
- final String? id = jsonConvert.convert<String>(json['id']);
|
|
|
- if (id != null) {
|
|
|
- facilityPageListFacilityType.id = id;
|
|
|
- }
|
|
|
- final String? name = jsonConvert.convert<String>(json['name']);
|
|
|
- if (name != null) {
|
|
|
- facilityPageListFacilityType.name = name;
|
|
|
- }
|
|
|
- return facilityPageListFacilityType;
|
|
|
-}
|
|
|
-
|
|
|
-Map<String, dynamic> $FacilityPageListFacilityTypeToJson(FacilityPageListFacilityType entity) {
|
|
|
- final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
- data['id'] = entity.id;
|
|
|
- data['name'] = entity.name;
|
|
|
- return data;
|
|
|
-}
|
|
|
-
|
|
|
-extension FacilityPageListFacilityTypeExtension on FacilityPageListFacilityType {
|
|
|
- FacilityPageListFacilityType copyWith({
|
|
|
- String? id,
|
|
|
- String? name,
|
|
|
- }) {
|
|
|
- return FacilityPageListFacilityType()
|
|
|
- ..id = id ?? this.id
|
|
|
- ..name = name ?? this.name;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
FacilityPageListTimePeriod $FacilityPageListTimePeriodFromJson(Map<String, dynamic> json) {
|
|
|
final FacilityPageListTimePeriod facilityPageListTimePeriod = FacilityPageListTimePeriod();
|
|
|
final String? price = jsonConvert.convert<String>(json['price']);
|
|
@@ -272,33 +250,61 @@ extension FacilityPageListTimePeriodExtension on FacilityPageListTimePeriod {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-FacilityPageListAccount $FacilityPageListAccountFromJson(Map<String, dynamic> json) {
|
|
|
- final FacilityPageListAccount facilityPageListAccount = FacilityPageListAccount();
|
|
|
+FacilityOrder $FacilityOrderFromJson(Map<String, dynamic> json) {
|
|
|
+ final FacilityOrder facilityOrder = FacilityOrder();
|
|
|
final String? id = jsonConvert.convert<String>(json['id']);
|
|
|
if (id != null) {
|
|
|
- facilityPageListAccount.id = id;
|
|
|
+ facilityOrder.id = id;
|
|
|
}
|
|
|
- final String? name = jsonConvert.convert<String>(json['name']);
|
|
|
- if (name != null) {
|
|
|
- facilityPageListAccount.name = name;
|
|
|
+ final String? totalAmount = jsonConvert.convert<String>(json['total_amount']);
|
|
|
+ if (totalAmount != null) {
|
|
|
+ facilityOrder.totalAmount = totalAmount;
|
|
|
+ }
|
|
|
+ final String? orderAmount = jsonConvert.convert<String>(json['order_amount']);
|
|
|
+ if (orderAmount != null) {
|
|
|
+ facilityOrder.orderAmount = orderAmount;
|
|
|
+ }
|
|
|
+ final String? depositAmount = jsonConvert.convert<String>(json['deposit_amount']);
|
|
|
+ if (depositAmount != null) {
|
|
|
+ facilityOrder.depositAmount = depositAmount;
|
|
|
}
|
|
|
- return facilityPageListAccount;
|
|
|
+ final int? paymentStatus = jsonConvert.convert<int>(json['payment_status']);
|
|
|
+ if (paymentStatus != null) {
|
|
|
+ facilityOrder.paymentStatus = paymentStatus;
|
|
|
+ }
|
|
|
+ final int? refundStatus = jsonConvert.convert<int>(json['refund_status']);
|
|
|
+ if (refundStatus != null) {
|
|
|
+ facilityOrder.refundStatus = refundStatus;
|
|
|
+ }
|
|
|
+ return facilityOrder;
|
|
|
}
|
|
|
|
|
|
-Map<String, dynamic> $FacilityPageListAccountToJson(FacilityPageListAccount entity) {
|
|
|
+Map<String, dynamic> $FacilityOrderToJson(FacilityOrder entity) {
|
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
data['id'] = entity.id;
|
|
|
- data['name'] = entity.name;
|
|
|
+ data['total_amount'] = entity.totalAmount;
|
|
|
+ data['order_amount'] = entity.orderAmount;
|
|
|
+ data['deposit_amount'] = entity.depositAmount;
|
|
|
+ data['payment_status'] = entity.paymentStatus;
|
|
|
+ data['refund_status'] = entity.refundStatus;
|
|
|
return data;
|
|
|
}
|
|
|
|
|
|
-extension FacilityPageListAccountExtension on FacilityPageListAccount {
|
|
|
- FacilityPageListAccount copyWith({
|
|
|
+extension FacilityOrderExtension on FacilityOrder {
|
|
|
+ FacilityOrder copyWith({
|
|
|
String? id,
|
|
|
- String? name,
|
|
|
+ String? totalAmount,
|
|
|
+ String? orderAmount,
|
|
|
+ String? depositAmount,
|
|
|
+ int? paymentStatus,
|
|
|
+ int? refundStatus,
|
|
|
}) {
|
|
|
- return FacilityPageListAccount()
|
|
|
+ return FacilityOrder()
|
|
|
..id = id ?? this.id
|
|
|
- ..name = name ?? this.name;
|
|
|
+ ..totalAmount = totalAmount ?? this.totalAmount
|
|
|
+ ..orderAmount = orderAmount ?? this.orderAmount
|
|
|
+ ..depositAmount = depositAmount ?? this.depositAmount
|
|
|
+ ..paymentStatus = paymentStatus ?? this.paymentStatus
|
|
|
+ ..refundStatus = refundStatus ?? this.refundStatus;
|
|
|
}
|
|
|
}
|