// ignore_for_file: invalid_annotation_target

import 'package:freezed_annotation/freezed_annotation.dart';

import '../address/address.dart';
import '../contact_person/contact_person.dart';

part 'customer.freezed.dart';
part 'customer.g.dart';

@freezed
abstract class Customer with _$Customer {
  const factory Customer({
    required String? id,
    required String? type,
    required String? status,
    @JsonKey(name: 'first_name') required String? firstName,
    @JsonKey(name: 'last_name') required String? lastName,
    @JsonKey(name: 'full_name') required String? fullName,
    required String? email,
    required String? phone,
    required String? mobile,
    @JsonKey(name: 'registration_number') required String? registrationNumber,
    @JsonKey(name: 'tax_id') required String? taxId,
    required String? industry,
    @JsonKey(name: 'business_type') required String? businessType,
    @JsonKey(name: 'employee_count') required int? employeeCount,
    @JsonKey(name: 'annual_revenue') required int? annualRevenue,
    @JsonKey(name: 'founded_year') required int? foundedYear,
    @JsonKey(name: 'is_verified') required bool? isVerified,
    @JsonKey(name: 'is_compliant') required bool? isCompliant,
    @JsonKey(name: 'compliance_notes') required String? complianceNotes,
    required String? language,
    required String? username,
    required String? currency,
    required String? timezone,
    @JsonKey(name: 'created_at') required int? createdAt,
    @JsonKey(name: 'updated_at') required int? updatedAt,
    @JsonKey(name: 'created_by') required String? createdBy,
    @JsonKey(name: 'updated_by') required String? updatedBy,
    required Address? address,
    required ContactPerson? contactPersons,
  }) = _Customer;

  factory Customer.fromJson(Map<String, Object?> json) =>
      _$CustomerFromJson(json);
}
