- 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>
37 lines
1.0 KiB
Dart
37 lines
1.0 KiB
Dart
part of '../auth_dtos.dart';
|
|
|
|
@freezed
|
|
abstract class ResendDto with _$ResendDto {
|
|
const factory ResendDto({
|
|
@JsonKey(name: 'status') String? status,
|
|
@JsonKey(name: 'message') String? message,
|
|
@JsonKey(name: 'data') ResendDataDto? data,
|
|
}) = _ResendDto;
|
|
|
|
factory ResendDto.fromJson(Map<String, dynamic> json) =>
|
|
_$ResendDtoFromJson(json);
|
|
|
|
const ResendDto._();
|
|
|
|
/// mapping ke domain
|
|
Resend toDomain() => Resend(
|
|
status: status?.toResendStatus() ?? ResendStatus.unknown,
|
|
message: message ?? '',
|
|
otpToken: data?.otpToken ?? '',
|
|
expiresIn: data?.expiresIn ?? 0,
|
|
nextResendIn: data?.nextResendIn ?? 0,
|
|
);
|
|
}
|
|
|
|
@freezed
|
|
abstract class ResendDataDto with _$ResendDataDto {
|
|
const factory ResendDataDto({
|
|
@JsonKey(name: 'otp_token') String? otpToken,
|
|
@JsonKey(name: 'expires_in') int? expiresIn,
|
|
@JsonKey(name: 'next_resend_in') int? nextResendIn,
|
|
}) = _ResendDataDto;
|
|
|
|
factory ResendDataDto.fromJson(Map<String, dynamic> json) =>
|
|
_$ResendDataDtoFromJson(json);
|
|
}
|