123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141 |
- import 'package:domain/entity/id_name_entity.dart';
- import 'package:domain/generated/json/base/json_field.dart';
- import 'package:domain/generated/json/service_order_detail_entity.g.dart';
- import 'dart:convert';
- export 'package:domain/generated/json/service_order_detail_entity.g.dart';
- @JsonSerializable()
- class ServiceOrderDetailEntity {
- String? id;
- String? sn;
- @JSONField(name: "total_amount")
- String? totalAmount;
- @JSONField(name: "paid_at")
- String? paidAt;
- String? notes;
- ServiceOrderDetailAccount? account;
- @JSONField(name: "order_service")
- ServiceOrderDetailOrderService? orderService;
- IdNameEntity? merchant;
- @JSONField(name: "order_products")
- List<ServiceOrderDetailOrderProducts>? orderProducts = [];
- ServiceOrderDetailEstate? estate;
- @JSONField(name: "estate_unit")
- ServiceOrderDetailEstateUnit? estateUnit;
- ServiceOrderDetailEntity();
- factory ServiceOrderDetailEntity.fromJson(Map<String, dynamic> json) => $ServiceOrderDetailEntityFromJson(json);
- Map<String, dynamic> toJson() => $ServiceOrderDetailEntityToJson(this);
- @override
- String toString() {
- return jsonEncode(this);
- }
- }
- @JsonSerializable()
- class ServiceOrderDetailAccount {
- String? id;
- String? name;
- String? avatar;
- String? phone;
- ServiceOrderDetailAccount();
- factory ServiceOrderDetailAccount.fromJson(Map<String, dynamic> json) => $ServiceOrderDetailAccountFromJson(json);
- Map<String, dynamic> toJson() => $ServiceOrderDetailAccountToJson(this);
- @override
- String toString() {
- return jsonEncode(this);
- }
- }
- @JsonSerializable()
- class ServiceOrderDetailOrderService {
- String? id;
- String? name;
- @JSONField(name: "evaluations_avg_score")
- double evaluationsAvgScore = 0.0;
- ServiceOrderDetailOrderService();
- factory ServiceOrderDetailOrderService.fromJson(Map<String, dynamic> json) => $ServiceOrderDetailOrderServiceFromJson(json);
- Map<String, dynamic> toJson() => $ServiceOrderDetailOrderServiceToJson(this);
- @override
- String toString() {
- return jsonEncode(this);
- }
- }
- @JsonSerializable()
- class ServiceOrderDetailOrderProducts {
- String? id;
- @JSONField(name: "product_name")
- String? productName;
- @JSONField(name: "product_amount")
- String? productAmount;
- @JSONField(name: "urgent_amount")
- String? urgentAmount;
- @JSONField(name: "holiday_amount")
- String? holidayAmount;
- @JSONField(name: "night_amount")
- String? nightAmount;
- int quantity = 0;
- @JSONField(name: "total_amount")
- String? totalAmount;
- @JSONField(name: "planned_service_at")
- String? plannedServiceAt;
- ServiceOrderDetailOrderProducts();
- factory ServiceOrderDetailOrderProducts.fromJson(Map<String, dynamic> json) => $ServiceOrderDetailOrderProductsFromJson(json);
- Map<String, dynamic> toJson() => $ServiceOrderDetailOrderProductsToJson(this);
- @override
- String toString() {
- return jsonEncode(this);
- }
- }
- @JsonSerializable()
- class ServiceOrderDetailEstate {
- String? id;
- String? name;
- ServiceOrderDetailEstate();
- factory ServiceOrderDetailEstate.fromJson(Map<String, dynamic> json) => $ServiceOrderDetailEstateFromJson(json);
- Map<String, dynamic> toJson() => $ServiceOrderDetailEstateToJson(this);
- @override
- String toString() {
- return jsonEncode(this);
- }
- }
- @JsonSerializable()
- class ServiceOrderDetailEstateUnit {
- String? id;
- String? unit;
- String? address;
- ServiceOrderDetailEstateUnit();
- factory ServiceOrderDetailEstateUnit.fromJson(Map<String, dynamic> json) => $ServiceOrderDetailEstateUnitFromJson(json);
- Map<String, dynamic> toJson() => $ServiceOrderDetailEstateUnitToJson(this);
- @override
- String toString() {
- return jsonEncode(this);
- }
- }
|