class crmUniversalSearchResponse {
  List<Accounts>? accounts;
  List<Enquires>? enquires;
  List<Leads>? leads;
  String? error;
  String? message;

  crmUniversalSearchResponse(
      {this.accounts, this.enquires, this.leads, this.error, this.message});

  crmUniversalSearchResponse.fromJson(Map<String, dynamic> json) {
    if (json['accounts'] != null) {
      accounts = <Accounts>[];
      json['accounts'].forEach((v) {
        accounts!.add(new Accounts.fromJson(v));
      });
    }
    if (json['enquires'] != null) {
      enquires = <Enquires>[];
      json['enquires'].forEach((v) {
        enquires!.add(new Enquires.fromJson(v));
      });
    }
    if (json['leads'] != null) {
      leads = <Leads>[];
      json['leads'].forEach((v) {
        leads!.add(new Leads.fromJson(v));
      });
    }
    error = json['error'];
    message = json['message'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.accounts != null) {
      data['accounts'] = this.accounts!.map((v) => v.toJson()).toList();
    }
    if (this.enquires != null) {
      data['enquires'] = this.enquires!.map((v) => v.toJson()).toList();
    }
    if (this.leads != null) {
      data['leads'] = this.leads!.map((v) => v.toJson()).toList();
    }
    data['error'] = this.error;
    data['message'] = this.message;
    return data;
  }
}

class Accounts {
  String? aid;
  String? aname;
  String? accman;
  String? conper;
  String? conmob;
  String? aaddress;

  Accounts(
      {this.aid,
        this.aname,
        this.accman,
        this.conper,
        this.conmob,
        this.aaddress});

  Accounts.fromJson(Map<String, dynamic> json) {
    aid = json['aid'];
    aname = json['aname'];
    accman = json['accman'];
    conper = json['conper'];
    conmob = json['conmob'];
    aaddress = json['aaddress'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['aid'] = this.aid;
    data['aname'] = this.aname;
    data['accman'] = this.accman;
    data['conper'] = this.conper;
    data['conmob'] = this.conmob;
    data['aaddress'] = this.aaddress;
    return data;
  }
}

class Enquires {
  String? id;
  String? refType;
  String? refId;
  String? sourceId;
  String? referenceId;
  String? companyId;
  String? name;
  String? companyName;
  String? mobile;
  String? altMobile;
  String? emailId;
  String? country;
  String? state;
  String? district;
  String? subLocation;
  String? address;
  String? product;
  String? requirement;
  String? extraInfo;
  String? feedbackStatus;
  String? enquiryManagerEmpId;
  String? openStatus;
  String? closingReasonId;
  String? closingLeadId;
  String? closingEmpId;
  String? closingDatetime;
  String? enteredEmpId;
  String? isExist;
  String? createdDatetime;
  String? updatedDatetime;
  String? refName;

  Enquires(
      {this.id,
        this.refType,
        this.refId,
        this.sourceId,
        this.referenceId,
        this.companyId,
        this.name,
        this.companyName,
        this.mobile,
        this.altMobile,
        this.emailId,
        this.country,
        this.state,
        this.district,
        this.subLocation,
        this.address,
        this.product,
        this.requirement,
        this.extraInfo,
        this.feedbackStatus,
        this.enquiryManagerEmpId,
        this.openStatus,
        this.closingReasonId,
        this.closingLeadId,
        this.closingEmpId,
        this.closingDatetime,
        this.enteredEmpId,
        this.isExist,
        this.createdDatetime,
        this.updatedDatetime,
        this.refName});

  Enquires.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    refType = json['ref_type'];
    refId = json['ref_id'];
    sourceId = json['source_id'];
    referenceId = json['reference_id'];
    companyId = json['company_id'];
    name = json['name'];
    companyName = json['company_name'];
    mobile = json['mobile'];
    altMobile = json['alt_mobile'];
    emailId = json['email_id'];
    country = json['country'];
    state = json['state'];
    district = json['district'];
    subLocation = json['sub_location'];
    address = json['address'];
    product = json['product'];
    requirement = json['requirement'];
    extraInfo = json['extra_info'];
    feedbackStatus = json['feedback_status'];
    enquiryManagerEmpId = json['enquiry_manager_emp_id'];
    openStatus = json['open_status'];
    closingReasonId = json['closing_reason_id'];
    closingLeadId = json['closing_lead_id'];
    closingEmpId = json['closing_emp_id'];
    closingDatetime = json['closing_datetime'];
    enteredEmpId = json['entered_emp_id'];
    isExist = json['is_exist'];
    createdDatetime = json['created_datetime'];
    updatedDatetime = json['updated_datetime'];
    refName = json['ref_name'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['ref_type'] = this.refType;
    data['ref_id'] = this.refId;
    data['source_id'] = this.sourceId;
    data['reference_id'] = this.referenceId;
    data['company_id'] = this.companyId;
    data['name'] = this.name;
    data['company_name'] = this.companyName;
    data['mobile'] = this.mobile;
    data['alt_mobile'] = this.altMobile;
    data['email_id'] = this.emailId;
    data['country'] = this.country;
    data['state'] = this.state;
    data['district'] = this.district;
    data['sub_location'] = this.subLocation;
    data['address'] = this.address;
    data['product'] = this.product;
    data['requirement'] = this.requirement;
    data['extra_info'] = this.extraInfo;
    data['feedback_status'] = this.feedbackStatus;
    data['enquiry_manager_emp_id'] = this.enquiryManagerEmpId;
    data['open_status'] = this.openStatus;
    data['closing_reason_id'] = this.closingReasonId;
    data['closing_lead_id'] = this.closingLeadId;
    data['closing_emp_id'] = this.closingEmpId;
    data['closing_datetime'] = this.closingDatetime;
    data['entered_emp_id'] = this.enteredEmpId;
    data['is_exist'] = this.isExist;
    data['created_datetime'] = this.createdDatetime;
    data['updated_datetime'] = this.updatedDatetime;
    data['ref_name'] = this.refName;
    return data;
  }
}

class Leads {
  String? lid;
  String? aname;
  String? accman;
  String? conper;
  String? conmob;
  String? aaddress;

  Leads(
      {this.lid,
        this.aname,
        this.accman,
        this.conper,
        this.conmob,
        this.aaddress});

  Leads.fromJson(Map<String, dynamic> json) {
    lid = json['lid'];
    aname = json['aname'];
    accman = json['accman'];
    conper = json['conper'];
    conmob = json['conmob'];
    aaddress = json['aaddress'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['lid'] = this.lid;
    data['aname'] = this.aname;
    data['accman'] = this.accman;
    data['conper'] = this.conper;
    data['conmob'] = this.conmob;
    data['aaddress'] = this.aaddress;
    return data;
  }
}
