import 'package:domain/entity/id_name_entity.dart';
import 'package:domain/generated/json/base/json_field.dart';
import 'package:domain/generated/json/comm_payment_detail_entity.g.dart';
import 'dart:convert';
export 'package:domain/generated/json/comm_payment_detail_entity.g.dart';

@JsonSerializable()
class CommPaymentDetailEntity {
	String? id;
	String? type;
	String? title;
	@JSONField(name: "total_amount")
	String? totalAmount;
	@JSONField(name: "order_amount")
	String? orderAmount;
	@JSONField(name: "refund_order_amount")
	String? refundOrderAmount;
	@JSONField(name: "deposit_amount")
	String? depositAmount;
	@JSONField(name: "refund_deposit_amount")
	String? refundDepositAmount;
	@JSONField(name: "payment_status")
	int paymentStatus = 0;
	@JSONField(name: "refund_status")
	int refundStatus = 0;
	@JSONField(name: "paid_at")
	String? paidAt;
	@JSONField(name: "refunded_at")
	String? refundedAt;
	@JSONField(name: "created_at")
	String? createdAt;
	IdNameEntity? account;
	CommPaymentDetailOrderable? orderable;

	CommPaymentDetailEntity();

	factory CommPaymentDetailEntity.fromJson(Map<String, dynamic> json) => $CommPaymentDetailEntityFromJson(json);

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

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

@JsonSerializable()
class CommPaymentDetailOrderable {
	int? id;

	CommPaymentDetailOrderable();

	factory CommPaymentDetailOrderable.fromJson(Map<String, dynamic> json) => $CommPaymentDetailOrderableFromJson(json);

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

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