This commit is contained in:
efrilm
2025-09-18 07:28:01 +07:00
parent 3b26b19b25
commit 214dfe3262
6 changed files with 28 additions and 24 deletions
+1
View File
@@ -1,5 +1,6 @@
import 'package:freezed_annotation/freezed_annotation.dart';
import '../../common/extension/extension.dart';
import '../../domain/auth/auth.dart';
part 'auth_dtos.freezed.dart';
@@ -13,7 +13,7 @@ class CheckPhoneDto with _$CheckPhoneDto {
factory CheckPhoneDto.fromJson(Map<String, dynamic> json) =>
_$CheckPhoneDtoFromJson(json);
CheckPhone toDomain() => CheckPhone(
status: status ?? '',
status: status?.toCheckPhoneStatus() ?? CheckPhoneStatus.unknown,
message: message ?? '',
phoneNumber: data?.phoneNumber ?? '',
);
+1 -1
View File
@@ -15,7 +15,7 @@ class ResendDto with _$ResendDto {
/// mapping ke domain
Resend toDomain() => Resend(
status: status ?? '',
status: status?.toResendStatus() ?? ResendStatus.unknown,
message: message ?? '',
otpToken: data?.otpToken ?? '',
expiresIn: data?.expiresIn ?? 0,