|
@@ -1,7 +1,8 @@
|
|
|
import 'package:domain/generated/json/base/json_convert_content.dart';
|
|
|
import 'package:domain/entity/paid_service_pay_success_info_entity.dart';
|
|
|
|
|
|
-PaidServicePaySuccessInfoEntity $PaidServicePaySuccessInfoEntityFromJson(Map<String, dynamic> json) {
|
|
|
+PaidServicePaySuccessInfoEntity $PaidServicePaySuccessInfoEntityFromJson(
|
|
|
+ Map<String, dynamic> json) {
|
|
|
final PaidServicePaySuccessInfoEntity paidServicePaySuccessInfoEntity = PaidServicePaySuccessInfoEntity();
|
|
|
final String? id = jsonConvert.convert<String>(json['id']);
|
|
|
if (id != null) {
|
|
@@ -23,38 +24,51 @@ PaidServicePaySuccessInfoEntity $PaidServicePaySuccessInfoEntityFromJson(Map<Str
|
|
|
if (notes != null) {
|
|
|
paidServicePaySuccessInfoEntity.notes = notes;
|
|
|
}
|
|
|
- final PaidServicePaySuccessInfoAccount? account = jsonConvert.convert<PaidServicePaySuccessInfoAccount>(json['account']);
|
|
|
+ final PaidServicePaySuccessInfoAccount? account = jsonConvert.convert<
|
|
|
+ PaidServicePaySuccessInfoAccount>(json['account']);
|
|
|
if (account != null) {
|
|
|
paidServicePaySuccessInfoEntity.account = account;
|
|
|
}
|
|
|
- final PaidServicePaySuccessInfoOrderService? orderService = jsonConvert.convert<PaidServicePaySuccessInfoOrderService>(json['order_service']);
|
|
|
+ final PaidServicePaySuccessInfoOrderService? orderService = jsonConvert
|
|
|
+ .convert<PaidServicePaySuccessInfoOrderService>(json['order_service']);
|
|
|
if (orderService != null) {
|
|
|
paidServicePaySuccessInfoEntity.orderService = orderService;
|
|
|
}
|
|
|
- final PaidServicePaySuccessInfoMerchant? merchant = jsonConvert.convert<PaidServicePaySuccessInfoMerchant>(json['merchant']);
|
|
|
+ final PaidServicePaySuccessInfoMerchant? merchant = jsonConvert.convert<
|
|
|
+ PaidServicePaySuccessInfoMerchant>(json['merchant']);
|
|
|
if (merchant != null) {
|
|
|
paidServicePaySuccessInfoEntity.merchant = merchant;
|
|
|
}
|
|
|
- final PaidServicePaySuccessInfoStaff? staff = jsonConvert.convert<PaidServicePaySuccessInfoStaff>(json['staff']);
|
|
|
+ final PaidServicePaySuccessInfoStaff? staff = jsonConvert.convert<
|
|
|
+ PaidServicePaySuccessInfoStaff>(json['staff']);
|
|
|
if (staff != null) {
|
|
|
paidServicePaySuccessInfoEntity.staff = staff;
|
|
|
}
|
|
|
- final PaidServicePaySuccessInfoOrderProducts? orderProducts = jsonConvert.convert<PaidServicePaySuccessInfoOrderProducts>(json['order_products']);
|
|
|
+ final PaidServicePaySuccessInfoOrderProducts? orderProducts = jsonConvert
|
|
|
+ .convert<PaidServicePaySuccessInfoOrderProducts>(json['order_products']);
|
|
|
if (orderProducts != null) {
|
|
|
paidServicePaySuccessInfoEntity.orderProducts = orderProducts;
|
|
|
}
|
|
|
- final PaidServicePaySuccessInfoEstate? estate = jsonConvert.convert<PaidServicePaySuccessInfoEstate>(json['estate']);
|
|
|
+ final PaidServicePaySuccessInfoEstate? estate = jsonConvert.convert<
|
|
|
+ PaidServicePaySuccessInfoEstate>(json['estate']);
|
|
|
if (estate != null) {
|
|
|
paidServicePaySuccessInfoEntity.estate = estate;
|
|
|
}
|
|
|
- final PaidServicePaySuccessInfoEstateUnit? estateUnit = jsonConvert.convert<PaidServicePaySuccessInfoEstateUnit>(json['estate_unit']);
|
|
|
+ final PaidServicePaySuccessInfoEstateUnit? estateUnit = jsonConvert.convert<
|
|
|
+ PaidServicePaySuccessInfoEstateUnit>(json['estate_unit']);
|
|
|
if (estateUnit != null) {
|
|
|
paidServicePaySuccessInfoEntity.estateUnit = estateUnit;
|
|
|
}
|
|
|
+ final PaidServicePaySuccessInfoOrder? order = jsonConvert.convert<
|
|
|
+ PaidServicePaySuccessInfoOrder>(json['order']);
|
|
|
+ if (order != null) {
|
|
|
+ paidServicePaySuccessInfoEntity.order = order;
|
|
|
+ }
|
|
|
return paidServicePaySuccessInfoEntity;
|
|
|
}
|
|
|
|
|
|
-Map<String, dynamic> $PaidServicePaySuccessInfoEntityToJson(PaidServicePaySuccessInfoEntity entity) {
|
|
|
+Map<String, dynamic> $PaidServicePaySuccessInfoEntityToJson(
|
|
|
+ PaidServicePaySuccessInfoEntity entity) {
|
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
data['id'] = entity.id;
|
|
|
data['sn'] = entity.sn;
|
|
@@ -68,6 +82,7 @@ Map<String, dynamic> $PaidServicePaySuccessInfoEntityToJson(PaidServicePaySucces
|
|
|
data['order_products'] = entity.orderProducts?.toJson();
|
|
|
data['estate'] = entity.estate?.toJson();
|
|
|
data['estate_unit'] = entity.estateUnit?.toJson();
|
|
|
+ data['order'] = entity.order?.toJson();
|
|
|
return data;
|
|
|
}
|
|
|
|
|
@@ -85,6 +100,7 @@ extension PaidServicePaySuccessInfoEntityExtension on PaidServicePaySuccessInfoE
|
|
|
PaidServicePaySuccessInfoOrderProducts? orderProducts,
|
|
|
PaidServicePaySuccessInfoEstate? estate,
|
|
|
PaidServicePaySuccessInfoEstateUnit? estateUnit,
|
|
|
+ PaidServicePaySuccessInfoOrder? order,
|
|
|
}) {
|
|
|
return PaidServicePaySuccessInfoEntity()
|
|
|
..id = id ?? this.id
|
|
@@ -98,11 +114,13 @@ extension PaidServicePaySuccessInfoEntityExtension on PaidServicePaySuccessInfoE
|
|
|
..staff = staff ?? this.staff
|
|
|
..orderProducts = orderProducts ?? this.orderProducts
|
|
|
..estate = estate ?? this.estate
|
|
|
- ..estateUnit = estateUnit ?? this.estateUnit;
|
|
|
+ ..estateUnit = estateUnit ?? this.estateUnit
|
|
|
+ ..order = order ?? this.order;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-PaidServicePaySuccessInfoAccount $PaidServicePaySuccessInfoAccountFromJson(Map<String, dynamic> json) {
|
|
|
+PaidServicePaySuccessInfoAccount $PaidServicePaySuccessInfoAccountFromJson(
|
|
|
+ Map<String, dynamic> json) {
|
|
|
final PaidServicePaySuccessInfoAccount paidServicePaySuccessInfoAccount = PaidServicePaySuccessInfoAccount();
|
|
|
final String? id = jsonConvert.convert<String>(json['id']);
|
|
|
if (id != null) {
|
|
@@ -123,7 +141,8 @@ PaidServicePaySuccessInfoAccount $PaidServicePaySuccessInfoAccountFromJson(Map<S
|
|
|
return paidServicePaySuccessInfoAccount;
|
|
|
}
|
|
|
|
|
|
-Map<String, dynamic> $PaidServicePaySuccessInfoAccountToJson(PaidServicePaySuccessInfoAccount entity) {
|
|
|
+Map<String, dynamic> $PaidServicePaySuccessInfoAccountToJson(
|
|
|
+ PaidServicePaySuccessInfoAccount entity) {
|
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
data['id'] = entity.id;
|
|
|
data['name'] = entity.name;
|
|
@@ -147,7 +166,8 @@ extension PaidServicePaySuccessInfoAccountExtension on PaidServicePaySuccessInfo
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-PaidServicePaySuccessInfoOrderService $PaidServicePaySuccessInfoOrderServiceFromJson(Map<String, dynamic> json) {
|
|
|
+PaidServicePaySuccessInfoOrderService $PaidServicePaySuccessInfoOrderServiceFromJson(
|
|
|
+ Map<String, dynamic> json) {
|
|
|
final PaidServicePaySuccessInfoOrderService paidServicePaySuccessInfoOrderService = PaidServicePaySuccessInfoOrderService();
|
|
|
final String? id = jsonConvert.convert<String>(json['id']);
|
|
|
if (id != null) {
|
|
@@ -157,14 +177,17 @@ PaidServicePaySuccessInfoOrderService $PaidServicePaySuccessInfoOrderServiceFrom
|
|
|
if (name != null) {
|
|
|
paidServicePaySuccessInfoOrderService.name = name;
|
|
|
}
|
|
|
- final int? evaluationsAvgScore = jsonConvert.convert<int>(json['evaluations_avg_score']);
|
|
|
+ final int? evaluationsAvgScore = jsonConvert.convert<int>(
|
|
|
+ json['evaluations_avg_score']);
|
|
|
if (evaluationsAvgScore != null) {
|
|
|
- paidServicePaySuccessInfoOrderService.evaluationsAvgScore = evaluationsAvgScore;
|
|
|
+ paidServicePaySuccessInfoOrderService.evaluationsAvgScore =
|
|
|
+ evaluationsAvgScore;
|
|
|
}
|
|
|
return paidServicePaySuccessInfoOrderService;
|
|
|
}
|
|
|
|
|
|
-Map<String, dynamic> $PaidServicePaySuccessInfoOrderServiceToJson(PaidServicePaySuccessInfoOrderService entity) {
|
|
|
+Map<String, dynamic> $PaidServicePaySuccessInfoOrderServiceToJson(
|
|
|
+ PaidServicePaySuccessInfoOrderService entity) {
|
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
data['id'] = entity.id;
|
|
|
data['name'] = entity.name;
|
|
@@ -185,7 +208,8 @@ extension PaidServicePaySuccessInfoOrderServiceExtension on PaidServicePaySucces
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-PaidServicePaySuccessInfoMerchant $PaidServicePaySuccessInfoMerchantFromJson(Map<String, dynamic> json) {
|
|
|
+PaidServicePaySuccessInfoMerchant $PaidServicePaySuccessInfoMerchantFromJson(
|
|
|
+ Map<String, dynamic> json) {
|
|
|
final PaidServicePaySuccessInfoMerchant paidServicePaySuccessInfoMerchant = PaidServicePaySuccessInfoMerchant();
|
|
|
final String? id = jsonConvert.convert<String>(json['id']);
|
|
|
if (id != null) {
|
|
@@ -195,14 +219,16 @@ PaidServicePaySuccessInfoMerchant $PaidServicePaySuccessInfoMerchantFromJson(Map
|
|
|
if (name != null) {
|
|
|
paidServicePaySuccessInfoMerchant.name = name;
|
|
|
}
|
|
|
- final String? contactPhone = jsonConvert.convert<String>(json['contact_phone']);
|
|
|
+ final String? contactPhone = jsonConvert.convert<String>(
|
|
|
+ json['contact_phone']);
|
|
|
if (contactPhone != null) {
|
|
|
paidServicePaySuccessInfoMerchant.contactPhone = contactPhone;
|
|
|
}
|
|
|
return paidServicePaySuccessInfoMerchant;
|
|
|
}
|
|
|
|
|
|
-Map<String, dynamic> $PaidServicePaySuccessInfoMerchantToJson(PaidServicePaySuccessInfoMerchant entity) {
|
|
|
+Map<String, dynamic> $PaidServicePaySuccessInfoMerchantToJson(
|
|
|
+ PaidServicePaySuccessInfoMerchant entity) {
|
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
data['id'] = entity.id;
|
|
|
data['name'] = entity.name;
|
|
@@ -223,7 +249,8 @@ extension PaidServicePaySuccessInfoMerchantExtension on PaidServicePaySuccessInf
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-PaidServicePaySuccessInfoStaff $PaidServicePaySuccessInfoStaffFromJson(Map<String, dynamic> json) {
|
|
|
+PaidServicePaySuccessInfoStaff $PaidServicePaySuccessInfoStaffFromJson(
|
|
|
+ Map<String, dynamic> json) {
|
|
|
final PaidServicePaySuccessInfoStaff paidServicePaySuccessInfoStaff = PaidServicePaySuccessInfoStaff();
|
|
|
final String? id = jsonConvert.convert<String>(json['id']);
|
|
|
if (id != null) {
|
|
@@ -240,7 +267,8 @@ PaidServicePaySuccessInfoStaff $PaidServicePaySuccessInfoStaffFromJson(Map<Strin
|
|
|
return paidServicePaySuccessInfoStaff;
|
|
|
}
|
|
|
|
|
|
-Map<String, dynamic> $PaidServicePaySuccessInfoStaffToJson(PaidServicePaySuccessInfoStaff entity) {
|
|
|
+Map<String, dynamic> $PaidServicePaySuccessInfoStaffToJson(
|
|
|
+ PaidServicePaySuccessInfoStaff entity) {
|
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
data['id'] = entity.id;
|
|
|
data['name'] = entity.name;
|
|
@@ -261,7 +289,8 @@ extension PaidServicePaySuccessInfoStaffExtension on PaidServicePaySuccessInfoSt
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-PaidServicePaySuccessInfoOrderProducts $PaidServicePaySuccessInfoOrderProductsFromJson(Map<String, dynamic> json) {
|
|
|
+PaidServicePaySuccessInfoOrderProducts $PaidServicePaySuccessInfoOrderProductsFromJson(
|
|
|
+ Map<String, dynamic> json) {
|
|
|
final PaidServicePaySuccessInfoOrderProducts paidServicePaySuccessInfoOrderProducts = PaidServicePaySuccessInfoOrderProducts();
|
|
|
final String? id = jsonConvert.convert<String>(json['id']);
|
|
|
if (id != null) {
|
|
@@ -279,14 +308,16 @@ PaidServicePaySuccessInfoOrderProducts $PaidServicePaySuccessInfoOrderProductsFr
|
|
|
if (totalAmount != null) {
|
|
|
paidServicePaySuccessInfoOrderProducts.totalAmount = totalAmount;
|
|
|
}
|
|
|
- final String? plannedServiceAt = jsonConvert.convert<String>(json['planned_service_at']);
|
|
|
+ final String? plannedServiceAt = jsonConvert.convert<String>(
|
|
|
+ json['planned_service_at']);
|
|
|
if (plannedServiceAt != null) {
|
|
|
paidServicePaySuccessInfoOrderProducts.plannedServiceAt = plannedServiceAt;
|
|
|
}
|
|
|
return paidServicePaySuccessInfoOrderProducts;
|
|
|
}
|
|
|
|
|
|
-Map<String, dynamic> $PaidServicePaySuccessInfoOrderProductsToJson(PaidServicePaySuccessInfoOrderProducts entity) {
|
|
|
+Map<String, dynamic> $PaidServicePaySuccessInfoOrderProductsToJson(
|
|
|
+ PaidServicePaySuccessInfoOrderProducts entity) {
|
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
data['id'] = entity.id;
|
|
|
data['product_name'] = entity.productName;
|
|
@@ -313,7 +344,8 @@ extension PaidServicePaySuccessInfoOrderProductsExtension on PaidServicePaySucce
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-PaidServicePaySuccessInfoEstate $PaidServicePaySuccessInfoEstateFromJson(Map<String, dynamic> json) {
|
|
|
+PaidServicePaySuccessInfoEstate $PaidServicePaySuccessInfoEstateFromJson(
|
|
|
+ Map<String, dynamic> json) {
|
|
|
final PaidServicePaySuccessInfoEstate paidServicePaySuccessInfoEstate = PaidServicePaySuccessInfoEstate();
|
|
|
final String? id = jsonConvert.convert<String>(json['id']);
|
|
|
if (id != null) {
|
|
@@ -326,7 +358,8 @@ PaidServicePaySuccessInfoEstate $PaidServicePaySuccessInfoEstateFromJson(Map<Str
|
|
|
return paidServicePaySuccessInfoEstate;
|
|
|
}
|
|
|
|
|
|
-Map<String, dynamic> $PaidServicePaySuccessInfoEstateToJson(PaidServicePaySuccessInfoEstate entity) {
|
|
|
+Map<String, dynamic> $PaidServicePaySuccessInfoEstateToJson(
|
|
|
+ PaidServicePaySuccessInfoEstate entity) {
|
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
data['id'] = entity.id;
|
|
|
data['name'] = entity.name;
|
|
@@ -344,7 +377,8 @@ extension PaidServicePaySuccessInfoEstateExtension on PaidServicePaySuccessInfoE
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-PaidServicePaySuccessInfoEstateUnit $PaidServicePaySuccessInfoEstateUnitFromJson(Map<String, dynamic> json) {
|
|
|
+PaidServicePaySuccessInfoEstateUnit $PaidServicePaySuccessInfoEstateUnitFromJson(
|
|
|
+ Map<String, dynamic> json) {
|
|
|
final PaidServicePaySuccessInfoEstateUnit paidServicePaySuccessInfoEstateUnit = PaidServicePaySuccessInfoEstateUnit();
|
|
|
final String? id = jsonConvert.convert<String>(json['id']);
|
|
|
if (id != null) {
|
|
@@ -361,7 +395,8 @@ PaidServicePaySuccessInfoEstateUnit $PaidServicePaySuccessInfoEstateUnitFromJson
|
|
|
return paidServicePaySuccessInfoEstateUnit;
|
|
|
}
|
|
|
|
|
|
-Map<String, dynamic> $PaidServicePaySuccessInfoEstateUnitToJson(PaidServicePaySuccessInfoEstateUnit entity) {
|
|
|
+Map<String, dynamic> $PaidServicePaySuccessInfoEstateUnitToJson(
|
|
|
+ PaidServicePaySuccessInfoEstateUnit entity) {
|
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
data['id'] = entity.id;
|
|
|
data['unit'] = entity.unit;
|
|
@@ -380,4 +415,66 @@ extension PaidServicePaySuccessInfoEstateUnitExtension on PaidServicePaySuccessI
|
|
|
..unit = unit ?? this.unit
|
|
|
..address = address ?? this.address;
|
|
|
}
|
|
|
+}
|
|
|
+
|
|
|
+PaidServicePaySuccessInfoOrder $PaidServicePaySuccessInfoOrderFromJson(
|
|
|
+ Map<String, dynamic> json) {
|
|
|
+ final PaidServicePaySuccessInfoOrder paidServicePaySuccessInfoOrder = PaidServicePaySuccessInfoOrder();
|
|
|
+ final int? id = jsonConvert.convert<int>(json['id']);
|
|
|
+ if (id != null) {
|
|
|
+ paidServicePaySuccessInfoOrder.id = id;
|
|
|
+ }
|
|
|
+ final String? totalAmount = jsonConvert.convert<String>(json['total_amount']);
|
|
|
+ if (totalAmount != null) {
|
|
|
+ paidServicePaySuccessInfoOrder.totalAmount = totalAmount;
|
|
|
+ }
|
|
|
+ final String? orderAmount = jsonConvert.convert<String>(json['order_amount']);
|
|
|
+ if (orderAmount != null) {
|
|
|
+ paidServicePaySuccessInfoOrder.orderAmount = orderAmount;
|
|
|
+ }
|
|
|
+ final String? depositAmount = jsonConvert.convert<String>(
|
|
|
+ json['deposit_amount']);
|
|
|
+ if (depositAmount != null) {
|
|
|
+ paidServicePaySuccessInfoOrder.depositAmount = depositAmount;
|
|
|
+ }
|
|
|
+ final int? paymentStatus = jsonConvert.convert<int>(json['payment_status']);
|
|
|
+ if (paymentStatus != null) {
|
|
|
+ paidServicePaySuccessInfoOrder.paymentStatus = paymentStatus;
|
|
|
+ }
|
|
|
+ final int? refundStatus = jsonConvert.convert<int>(json['refund_status']);
|
|
|
+ if (refundStatus != null) {
|
|
|
+ paidServicePaySuccessInfoOrder.refundStatus = refundStatus;
|
|
|
+ }
|
|
|
+ return paidServicePaySuccessInfoOrder;
|
|
|
+}
|
|
|
+
|
|
|
+Map<String, dynamic> $PaidServicePaySuccessInfoOrderToJson(
|
|
|
+ PaidServicePaySuccessInfoOrder entity) {
|
|
|
+ final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
+ data['id'] = entity.id;
|
|
|
+ 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 PaidServicePaySuccessInfoOrderExtension on PaidServicePaySuccessInfoOrder {
|
|
|
+ PaidServicePaySuccessInfoOrder copyWith({
|
|
|
+ int? id,
|
|
|
+ String? totalAmount,
|
|
|
+ String? orderAmount,
|
|
|
+ String? depositAmount,
|
|
|
+ int? paymentStatus,
|
|
|
+ int? refundStatus,
|
|
|
+ }) {
|
|
|
+ return PaidServicePaySuccessInfoOrder()
|
|
|
+ ..id = id ?? this.id
|
|
|
+ ..totalAmount = totalAmount ?? this.totalAmount
|
|
|
+ ..orderAmount = orderAmount ?? this.orderAmount
|
|
|
+ ..depositAmount = depositAmount ?? this.depositAmount
|
|
|
+ ..paymentStatus = paymentStatus ?? this.paymentStatus
|
|
|
+ ..refundStatus = refundStatus ?? this.refundStatus;
|
|
|
+ }
|
|
|
}
|