class CustomerRequestModel {
  final String referencedate;
  final String referencetype;
  final int customerid;
  final int tenantid;
  final int locationid;
  final String subject;
  final String remarks;
  final int status;
  final int apptypeid;

  CustomerRequestModel({
    required this.referencedate,
    required this.referencetype,
    required this.customerid,
    required this.tenantid,
    required this.locationid,
    required this.subject,
    required this.remarks,
    required this.status,
    required this.apptypeid,
  });

  Map<String, dynamic> toJson() {
    return {
      "referencedate": referencedate,
      "referencetype": referencetype,
      "customerid": customerid,
      "tenantid": tenantid,
      "locationid": locationid,
      "subject": subject,
      "remarks": remarks,
      "status": status,
      "apptypeid": apptypeid,
    };
  }
}

class CustomerRequestStatusModel {
  final int customerrequestid;
  final String referencedate;
  final String referencetype;
  final int customerid;
  final int tenantid;
  final int apptypeid;
  final int locationid;
  final String subject;
  final String remarks;
  final int status;
  final String created;
  final String updated;

  CustomerRequestStatusModel({
    required this.customerrequestid,
    required this.referencedate,
    required this.referencetype,
    required this.customerid,
    required this.tenantid,
    required this.apptypeid,
    required this.locationid,
    required this.subject,
    required this.remarks,
    required this.status,
    required this.created,
    required this.updated,
  });

  factory CustomerRequestStatusModel.fromJson(Map<String, dynamic> json) {
    return CustomerRequestStatusModel(
      customerrequestid: json['customerrequestid'] ?? 0,
      referencedate: json['referencedate'] ?? "",
      referencetype: json['referencetype'] ?? "",
      customerid: json['customerid'] ?? 0,
      tenantid: json['tenantid'] ?? 0,
      apptypeid: json['apptypeid'] ?? 0,
      locationid: json['locationid'] ?? 0,
      subject: json['subject'] ?? "",
      remarks: json['remarks'] ?? "",
      status: json['status'] ?? 0,
      created: json['created'] ?? "",
      updated: json['updated'] ?? "",
    );
  }
}
