This commit is contained in:
efrilm
2025-11-01 16:17:45 +07:00
parent ef23839761
commit 069c2296de
24 changed files with 2670 additions and 133 deletions
@@ -44,6 +44,7 @@ class OrderDto with _$OrderDto {
@JsonKey(name: "remaining_amount") int? remainingAmount,
@JsonKey(name: "payment_status") String? paymentStatus,
@JsonKey(name: "refund_amount") int? refundAmount,
@JsonKey(name: "refund_reason") String? refundReason,
@JsonKey(name: "is_void") bool? isVoid,
@JsonKey(name: "is_refund") bool? isRefund,
@JsonKey(name: "notes") String? notes,
@@ -61,6 +62,7 @@ class OrderDto with _$OrderDto {
_$OrderDtoFromJson(json);
// Optional: mapper ke domain entity
Order toDomain() => Order(
id: id ?? '',
orderNumber: orderNumber ?? '',
@@ -88,6 +90,7 @@ class OrderDto with _$OrderDto {
totalPaid: totalPaid ?? 0,
paymentCount: paymentCount ?? 0,
splitType: splitType ?? '',
refundReason: refundReason ?? '',
);
}