payment method

This commit is contained in:
efrilm
2025-10-27 14:24:29 +07:00
parent 3135dde317
commit 9e5a6cc7ae
22 changed files with 3058 additions and 2 deletions
@@ -0,0 +1,43 @@
part of '../payment_method.dart';
@freezed
class ListPaymentMethod with _$ListPaymentMethod {
const factory ListPaymentMethod({
required List<PaymentMethod> paymentMethods,
required int totalCount,
required int page,
required int limit,
required int totalPages,
}) = _ListPaymentMethod;
factory ListPaymentMethod.empty() => ListPaymentMethod(
paymentMethods: [],
totalCount: 0,
page: 0,
limit: 0,
totalPages: 0,
);
}
@freezed
class PaymentMethod with _$PaymentMethod {
const factory PaymentMethod({
required String id,
required String organizationId,
required String name,
required String type,
required bool isActive,
required DateTime createdAt,
required DateTime updatedAt,
}) = _PaymentMethod;
factory PaymentMethod.empty() => PaymentMethod(
id: '',
organizationId: '',
name: '',
type: '',
isActive: false,
createdAt: DateTime(1970),
updatedAt: DateTime(1970),
);
}