part of '../customer.dart';

@freezed
class ListCustomer with _$ListCustomer {
  const factory ListCustomer({
    required List<Customer> customers,
    required int totalCount,
    required int page,
    required int limit,
    required int totalPages,
  }) = _ListCustomer;

  factory ListCustomer.empty() => const ListCustomer(
    customers: [],
    totalCount: 0,
    page: 0,
    limit: 0,
    totalPages: 0,
  );
}

@freezed
class Customer with _$Customer {
  const factory Customer({
    required String id,
    required String organizationId,
    required String name,
    required String email,
    required String phone,
    required String address,
    required bool isDefault,
    required bool isActive,
    required Map<String, dynamic> metadata,
    required DateTime createdAt,
    required DateTime updatedAt,
  }) = _Customer;

  factory Customer.empty() => Customer(
    id: '',
    organizationId: '',
    name: '',
    email: '',
    phone: '',
    address: '',
    isDefault: false,
    isActive: false,
    metadata: const {},
    createdAt: DateTime(1970),
    updatedAt: DateTime(1970),
  );
}
