EnakPoint & EnakCoin wallet, PIN, outlet, order, community, reward
- Wallet EnakPoint & EnakCoin: beranda, riwayat, saldo kedaluwarsa, kode bayar, tukar EnakCoin, transfer - PIN (buat, ganti, lupa), outlet, riwayat order, game spin - Halaman community, webview, coming soon, dan ikon menu beranda baru - Redesign Reward Saya: kartu tiket, filter chip, detail kode + QR - Hapus customer point loader, menu, dan checkout lama - Base URL ke enaklo-pos-api.altru.id Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
5954510b93
commit
f5e3075205
@@ -0,0 +1,373 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'wallet_dtos.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_WalletSummaryDto _$WalletSummaryDtoFromJson(Map<String, dynamic> json) =>
|
||||
_WalletSummaryDto(
|
||||
pointBalance: (json['point_balance'] as num?)?.toInt(),
|
||||
coinBalance: (json['coin_balance'] as num?)?.toInt(),
|
||||
pointValue: (json['point_value'] as num?)?.toInt(),
|
||||
pointDiscountValue: (json['point_discount_value'] as num?)?.toInt(),
|
||||
nearestExpiring: json['nearest_expiring'] == null
|
||||
? null
|
||||
: NearestExpiringDto.fromJson(
|
||||
json['nearest_expiring'] as Map<String, dynamic>,
|
||||
),
|
||||
recentTransactions: (json['recent_transactions'] as List<dynamic>?)
|
||||
?.map((e) => WalletTransactionDto.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$WalletSummaryDtoToJson(_WalletSummaryDto instance) =>
|
||||
<String, dynamic>{
|
||||
'point_balance': instance.pointBalance,
|
||||
'coin_balance': instance.coinBalance,
|
||||
'point_value': instance.pointValue,
|
||||
'point_discount_value': instance.pointDiscountValue,
|
||||
'nearest_expiring': instance.nearestExpiring,
|
||||
'recent_transactions': instance.recentTransactions,
|
||||
};
|
||||
|
||||
_NearestExpiringDto _$NearestExpiringDtoFromJson(Map<String, dynamic> json) =>
|
||||
_NearestExpiringDto(
|
||||
point: json['point'] == null
|
||||
? null
|
||||
: ExpiringAmountDto.fromJson(json['point'] as Map<String, dynamic>),
|
||||
coin: json['coin'] == null
|
||||
? null
|
||||
: ExpiringAmountDto.fromJson(json['coin'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$NearestExpiringDtoToJson(_NearestExpiringDto instance) =>
|
||||
<String, dynamic>{'point': instance.point, 'coin': instance.coin};
|
||||
|
||||
_ExpiringAmountDto _$ExpiringAmountDtoFromJson(Map<String, dynamic> json) =>
|
||||
_ExpiringAmountDto(
|
||||
amount: (json['amount'] as num?)?.toInt(),
|
||||
date: json['date'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ExpiringAmountDtoToJson(_ExpiringAmountDto instance) =>
|
||||
<String, dynamic>{'amount': instance.amount, 'date': instance.date};
|
||||
|
||||
_WalletTransactionDto _$WalletTransactionDtoFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _WalletTransactionDto(
|
||||
id: json['id'] as String?,
|
||||
currency: json['currency'] as String?,
|
||||
type: json['type'] as String?,
|
||||
amount: (json['amount'] as num?)?.toInt(),
|
||||
balanceAfter: (json['balance_after'] as num?)?.toInt(),
|
||||
description: json['description'] as String?,
|
||||
groupId: json['group_id'] as String?,
|
||||
expiresAt: json['expires_at'] as String?,
|
||||
createdAt: json['created_at'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$WalletTransactionDtoToJson(
|
||||
_WalletTransactionDto instance,
|
||||
) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'currency': instance.currency,
|
||||
'type': instance.type,
|
||||
'amount': instance.amount,
|
||||
'balance_after': instance.balanceAfter,
|
||||
'description': instance.description,
|
||||
'group_id': instance.groupId,
|
||||
'expires_at': instance.expiresAt,
|
||||
'created_at': instance.createdAt,
|
||||
};
|
||||
|
||||
_WalletPaginationDto _$WalletPaginationDtoFromJson(Map<String, dynamic> json) =>
|
||||
_WalletPaginationDto(
|
||||
page: (json['page'] as num?)?.toInt(),
|
||||
limit: (json['limit'] as num?)?.toInt(),
|
||||
totalCount: (json['total_count'] as num?)?.toInt(),
|
||||
totalPages: (json['total_pages'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$WalletPaginationDtoToJson(
|
||||
_WalletPaginationDto instance,
|
||||
) => <String, dynamic>{
|
||||
'page': instance.page,
|
||||
'limit': instance.limit,
|
||||
'total_count': instance.totalCount,
|
||||
'total_pages': instance.totalPages,
|
||||
};
|
||||
|
||||
_WalletExpiringDto _$WalletExpiringDtoFromJson(Map<String, dynamic> json) =>
|
||||
_WalletExpiringDto(
|
||||
point: (json['point'] as List<dynamic>?)
|
||||
?.map((e) => ExpiringAmountDto.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
coin: (json['coin'] as List<dynamic>?)
|
||||
?.map((e) => ExpiringAmountDto.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$WalletExpiringDtoToJson(_WalletExpiringDto instance) =>
|
||||
<String, dynamic>{'point': instance.point, 'coin': instance.coin};
|
||||
|
||||
_PaymentCodeDto _$PaymentCodeDtoFromJson(Map<String, dynamic> json) =>
|
||||
_PaymentCodeDto(
|
||||
code: json['code'] as String?,
|
||||
qrPayload: json['qr_payload'] as String?,
|
||||
expiresAt: json['expires_at'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$PaymentCodeDtoToJson(_PaymentCodeDto instance) =>
|
||||
<String, dynamic>{
|
||||
'code': instance.code,
|
||||
'qr_payload': instance.qrPayload,
|
||||
'expires_at': instance.expiresAt,
|
||||
};
|
||||
|
||||
_ExchangePreviewDto _$ExchangePreviewDtoFromJson(Map<String, dynamic> json) =>
|
||||
_ExchangePreviewDto(
|
||||
coinAmount: (json['coin_amount'] as num?)?.toInt(),
|
||||
pointAmount: (json['point_amount'] as num?)?.toInt(),
|
||||
coinBalance: (json['coin_balance'] as num?)?.toInt(),
|
||||
coins: (json['coins'] as num?)?.toInt(),
|
||||
points: (json['points'] as num?)?.toInt(),
|
||||
valid: json['valid'] as bool?,
|
||||
reason: json['reason'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ExchangePreviewDtoToJson(_ExchangePreviewDto instance) =>
|
||||
<String, dynamic>{
|
||||
'coin_amount': instance.coinAmount,
|
||||
'point_amount': instance.pointAmount,
|
||||
'coin_balance': instance.coinBalance,
|
||||
'coins': instance.coins,
|
||||
'points': instance.points,
|
||||
'valid': instance.valid,
|
||||
'reason': instance.reason,
|
||||
};
|
||||
|
||||
_ExchangeResultDto _$ExchangeResultDtoFromJson(Map<String, dynamic> json) =>
|
||||
_ExchangeResultDto(
|
||||
coins: (json['coins'] as num?)?.toInt(),
|
||||
points: (json['points'] as num?)?.toInt(),
|
||||
coinBalance: (json['coin_balance'] as num?)?.toInt(),
|
||||
pointBalance: (json['point_balance'] as num?)?.toInt(),
|
||||
lots: (json['lots'] as List<dynamic>?)
|
||||
?.map((e) => WalletLotDto.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
replayed: json['replayed'] as bool?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ExchangeResultDtoToJson(_ExchangeResultDto instance) =>
|
||||
<String, dynamic>{
|
||||
'coins': instance.coins,
|
||||
'points': instance.points,
|
||||
'coin_balance': instance.coinBalance,
|
||||
'point_balance': instance.pointBalance,
|
||||
'lots': instance.lots,
|
||||
'replayed': instance.replayed,
|
||||
};
|
||||
|
||||
_WalletLotDto _$WalletLotDtoFromJson(Map<String, dynamic> json) =>
|
||||
_WalletLotDto(
|
||||
amount: (json['amount'] as num?)?.toInt(),
|
||||
expiresAt: json['expires_at'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$WalletLotDtoToJson(_WalletLotDto instance) =>
|
||||
<String, dynamic>{
|
||||
'amount': instance.amount,
|
||||
'expires_at': instance.expiresAt,
|
||||
};
|
||||
|
||||
_TransferRecipientDto _$TransferRecipientDtoFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _TransferRecipientDto(
|
||||
name: json['name'] as String?,
|
||||
phoneNumber: json['phone_number'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$TransferRecipientDtoToJson(
|
||||
_TransferRecipientDto instance,
|
||||
) => <String, dynamic>{
|
||||
'name': instance.name,
|
||||
'phone_number': instance.phoneNumber,
|
||||
};
|
||||
|
||||
_TransferResultDto _$TransferResultDtoFromJson(Map<String, dynamic> json) =>
|
||||
_TransferResultDto(
|
||||
currency: json['currency'] as String?,
|
||||
amount: (json['amount'] as num?)?.toInt(),
|
||||
recipient: json['recipient'] == null
|
||||
? null
|
||||
: TransferRecipientDto.fromJson(
|
||||
json['recipient'] as Map<String, dynamic>,
|
||||
),
|
||||
lots: (json['lots'] as List<dynamic>?)
|
||||
?.map((e) => WalletLotDto.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
balance: (json['balance'] as num?)?.toInt(),
|
||||
replayed: json['replayed'] as bool?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$TransferResultDtoToJson(_TransferResultDto instance) =>
|
||||
<String, dynamic>{
|
||||
'currency': instance.currency,
|
||||
'amount': instance.amount,
|
||||
'recipient': instance.recipient,
|
||||
'lots': instance.lots,
|
||||
'balance': instance.balance,
|
||||
'replayed': instance.replayed,
|
||||
};
|
||||
|
||||
_PinStatusDto _$PinStatusDtoFromJson(Map<String, dynamic> json) =>
|
||||
_PinStatusDto(
|
||||
hasPin: json['has_pin'] as bool?,
|
||||
lockedUntil: json['locked_until'] as String?,
|
||||
transferBlockedUntil: json['transfer_blocked_until'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$PinStatusDtoToJson(_PinStatusDto instance) =>
|
||||
<String, dynamic>{
|
||||
'has_pin': instance.hasPin,
|
||||
'locked_until': instance.lockedUntil,
|
||||
'transfer_blocked_until': instance.transferBlockedUntil,
|
||||
};
|
||||
|
||||
_PinOtpDto _$PinOtpDtoFromJson(Map<String, dynamic> json) => _PinOtpDto(
|
||||
purpose: json['purpose'] as String?,
|
||||
otpToken: json['otp_token'] as String?,
|
||||
expiresAt: json['expires_at'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$PinOtpDtoToJson(_PinOtpDto instance) =>
|
||||
<String, dynamic>{
|
||||
'purpose': instance.purpose,
|
||||
'otp_token': instance.otpToken,
|
||||
'expires_at': instance.expiresAt,
|
||||
};
|
||||
|
||||
_OutletDto _$OutletDtoFromJson(Map<String, dynamic> json) => _OutletDto(
|
||||
id: json['id'] as String?,
|
||||
name: json['name'] as String?,
|
||||
address: json['address'] as String?,
|
||||
acceptsPointPayment: json['accepts_point_payment'] as bool?,
|
||||
earnsPoints: json['earns_points'] as bool?,
|
||||
earnsCoins: json['earns_coins'] as bool?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$OutletDtoToJson(_OutletDto instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
'address': instance.address,
|
||||
'accepts_point_payment': instance.acceptsPointPayment,
|
||||
'earns_points': instance.earnsPoints,
|
||||
'earns_coins': instance.earnsCoins,
|
||||
};
|
||||
|
||||
_CustomerOrderDto _$CustomerOrderDtoFromJson(Map<String, dynamic> json) =>
|
||||
_CustomerOrderDto(
|
||||
id: json['id'] as String?,
|
||||
orderNumber: json['order_number'] as String?,
|
||||
outletName: json['outlet_name'] as String?,
|
||||
orderType: json['order_type'] as String?,
|
||||
status: json['status'] as String?,
|
||||
paymentStatus: json['payment_status'] as String?,
|
||||
totalAmount: (json['total_amount'] as num?)?.toInt(),
|
||||
itemCount: (json['item_count'] as num?)?.toInt(),
|
||||
isVoid: json['is_void'] as bool?,
|
||||
isRefund: json['is_refund'] as bool?,
|
||||
pointsEarned: (json['points_earned'] as num?)?.toInt(),
|
||||
coinsEarned: (json['coins_earned'] as num?)?.toInt(),
|
||||
createdAt: json['created_at'] as String?,
|
||||
tableNumber: json['table_number'] as String?,
|
||||
subtotal: (json['subtotal'] as num?)?.toInt(),
|
||||
discountAmount: (json['discount_amount'] as num?)?.toInt(),
|
||||
taxAmount: (json['tax_amount'] as num?)?.toInt(),
|
||||
refundAmount: (json['refund_amount'] as num?)?.toInt(),
|
||||
items: (json['items'] as List<dynamic>?)
|
||||
?.map((e) => CustomerOrderItemDto.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
payments: (json['payments'] as List<dynamic>?)
|
||||
?.map(
|
||||
(e) => CustomerOrderPaymentDto.fromJson(e as Map<String, dynamic>),
|
||||
)
|
||||
.toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$CustomerOrderDtoToJson(_CustomerOrderDto instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'order_number': instance.orderNumber,
|
||||
'outlet_name': instance.outletName,
|
||||
'order_type': instance.orderType,
|
||||
'status': instance.status,
|
||||
'payment_status': instance.paymentStatus,
|
||||
'total_amount': instance.totalAmount,
|
||||
'item_count': instance.itemCount,
|
||||
'is_void': instance.isVoid,
|
||||
'is_refund': instance.isRefund,
|
||||
'points_earned': instance.pointsEarned,
|
||||
'coins_earned': instance.coinsEarned,
|
||||
'created_at': instance.createdAt,
|
||||
'table_number': instance.tableNumber,
|
||||
'subtotal': instance.subtotal,
|
||||
'discount_amount': instance.discountAmount,
|
||||
'tax_amount': instance.taxAmount,
|
||||
'refund_amount': instance.refundAmount,
|
||||
'items': instance.items,
|
||||
'payments': instance.payments,
|
||||
};
|
||||
|
||||
_CustomerOrderItemDto _$CustomerOrderItemDtoFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _CustomerOrderItemDto(
|
||||
id: json['id'] as String?,
|
||||
productName: json['product_name'] as String?,
|
||||
variantName: json['variant_name'] as String?,
|
||||
quantity: (json['quantity'] as num?)?.toInt(),
|
||||
weight: (json['weight'] as num?)?.toDouble(),
|
||||
unitName: json['unit_name'] as String?,
|
||||
unitPrice: (json['unit_price'] as num?)?.toInt(),
|
||||
totalPrice: (json['total_price'] as num?)?.toInt(),
|
||||
refundQuantity: (json['refund_quantity'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$CustomerOrderItemDtoToJson(
|
||||
_CustomerOrderItemDto instance,
|
||||
) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'product_name': instance.productName,
|
||||
'variant_name': instance.variantName,
|
||||
'quantity': instance.quantity,
|
||||
'weight': instance.weight,
|
||||
'unit_name': instance.unitName,
|
||||
'unit_price': instance.unitPrice,
|
||||
'total_price': instance.totalPrice,
|
||||
'refund_quantity': instance.refundQuantity,
|
||||
};
|
||||
|
||||
_CustomerOrderPaymentDto _$CustomerOrderPaymentDtoFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _CustomerOrderPaymentDto(
|
||||
id: json['id'] as String?,
|
||||
methodName: json['method_name'] as String?,
|
||||
methodType: json['method_type'] as String?,
|
||||
amount: (json['amount'] as num?)?.toInt(),
|
||||
refundAmount: (json['refund_amount'] as num?)?.toInt(),
|
||||
pointsUsed: (json['points_used'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$CustomerOrderPaymentDtoToJson(
|
||||
_CustomerOrderPaymentDto instance,
|
||||
) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'method_name': instance.methodName,
|
||||
'method_type': instance.methodType,
|
||||
'amount': instance.amount,
|
||||
'refund_amount': instance.refundAmount,
|
||||
'points_used': instance.pointsUsed,
|
||||
};
|
||||
Reference in New Issue
Block a user