class CallSiteContactPerson {
  CallSiteContactPerson({
    this.id,
    this.employeeCode = "", // Provide default value
    this.name = "", // Provide default value
    this.telephone = "", // Provide default value
    this.job = "", // Provide default value
    this.email = "", // Provide default value
    this.land = "", // Provide default value
    this.contactUserId = "", // Provide default value
  });

  CallSiteContactPerson.fromJson(Map<String, dynamic> json) {
    // Specify Map type
    id = json['id'];
    employeeCode = json['employeeCode'] ?? ""; // Provide default value if null
    name = json['name'] ?? ""; // Provide default value if null
    telephone = json['telephone'] ?? ""; // Provide default value if null
    job = json['job'] ?? ""; // Provide default value if null
    email = json['email'] ?? ""; // Provide default value if null
    land = json['land'] ?? ""; // Provide default value if null
    contactUserId = json['contactUserId'] ?? ""; // Provide default value if null
  }

  num? id;
  String? employeeCode;
  String? name;
  String? telephone;
  String? job;
  String? email;
  String? land;
  String? contactUserId;

  CallSiteContactPerson copyWith({
    num? id,
    String? employeeCode,
    String? name,
    String? telephone,
    String? job,
    String? email,
    String? land,
    String? contactUserId,
  }) =>
      CallSiteContactPerson(
        id: id ?? this.id,
        employeeCode: employeeCode ?? this.employeeCode,
        name: name ?? this.name,
        telephone: telephone ?? this.telephone,
        job: job ?? this.job,
        email: email ?? this.email,
        land: land ?? this.land,
        contactUserId: contactUserId ?? this.contactUserId,
      );

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['id'] = id;
    map['employeeCode'] = employeeCode;
    map['name'] = name;
    map['telephone'] = telephone;
    map['job'] = job;
    map['email'] = email;
    map['land'] = land;
    map['contactUserId'] = contactUserId;
    return map;
  }
}
