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")
	int? totalAmount;
	@JSONField(name: "order_status")
	int? orderStatus;
	@JSONField(name: "cancel_status")
	String? cancelStatus;
	@JSONField(name: "paid_at")
	String? paidAt;
	String? notes;
	ServiceOrderDetailAccount? account;
	@JSONField(name: "order_service")
	ServiceOrderDetailOrderService? orderService;
	ServiceOrderDetailMerchant? merchant;
	ServiceOrderDetailStaff? staff;
	@JSONField(name: "order_products")
	List<ServiceOrderDetailOrderProducts>? orderProducts;
	ServiceOrderDetailEstate? estate;
	@JSONField(name: "estate_unit")
	ServiceOrderDetailEstateUnit? estateUnit;
	ServiceOrderDetailOrder? order;

	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")
	int? evaluationsAvgScore;

	ServiceOrderDetailOrderService();

	factory ServiceOrderDetailOrderService.fromJson(Map<String, dynamic> json) => $ServiceOrderDetailOrderServiceFromJson(json);

	Map<String, dynamic> toJson() => $ServiceOrderDetailOrderServiceToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class ServiceOrderDetailMerchant {
	String? id;
	String? name;
	@JSONField(name: "contact_phone")
	String? contactPhone;

	ServiceOrderDetailMerchant();

	factory ServiceOrderDetailMerchant.fromJson(Map<String, dynamic> json) => $ServiceOrderDetailMerchantFromJson(json);

	Map<String, dynamic> toJson() => $ServiceOrderDetailMerchantToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class ServiceOrderDetailStaff {
	String? id;
	String? name;
	String? phone;

	ServiceOrderDetailStaff();

	factory ServiceOrderDetailStaff.fromJson(Map<String, dynamic> json) => $ServiceOrderDetailStaffFromJson(json);

	Map<String, dynamic> toJson() => $ServiceOrderDetailStaffToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class ServiceOrderDetailOrderProducts {
	String? id;
	@JSONField(name: "product_name")
	String? productName;
	int? quantity;
	@JSONField(name: "total_amount")
	int? 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);
	}
}

@JsonSerializable()
class ServiceOrderDetailOrder {
	int? id;
	@JSONField(name: "total_amount")
	String? totalAmount;
	@JSONField(name: "order_amount")
	String? orderAmount;
	@JSONField(name: "deposit_amount")
	String? depositAmount;
	@JSONField(name: "payment_status")
	int? paymentStatus;
	@JSONField(name: "paid_at")
	String? paidAt;
	@JSONField(name: "refund_status")
	int? refundStatus;
	@JSONField(name: "refunded_at")
	String? refundedAt;

	ServiceOrderDetailOrder();

	factory ServiceOrderDetailOrder.fromJson(Map<String, dynamic> json) => $ServiceOrderDetailOrderFromJson(json);

	Map<String, dynamic> toJson() => $ServiceOrderDetailOrderToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}