Files
efrilm 38850b281f
Build & Deploy iOS to TestFlight / build-and-deploy (push) Waiting to run
feat: integrate enakgame and voucher
2026-10-10 02:33:16 +07:00

26 lines
708 B
Dart

part of '../wallet_dtos.dart';
@freezed
abstract class OutletDto with _$OutletDto {
const factory OutletDto({
@JsonKey(name: 'id') String? id,
@JsonKey(name: 'name') String? name,
@JsonKey(name: 'address') String? address,
@JsonKey(name: 'earns_points') bool? earnsPoints,
@JsonKey(name: 'earns_coins') bool? earnsCoins,
}) = _OutletDto;
factory OutletDto.fromJson(Map<String, dynamic> json) =>
_$OutletDtoFromJson(json);
const OutletDto._();
Outlet toDomain() => Outlet(
id: id ?? '',
name: name ?? '',
address: (address?.trim().isEmpty ?? true) ? null : address!.trim(),
earnsPoints: earnsPoints ?? false,
earnsCoins: earnsCoins ?? false,
);
}