class GetLocationByTenantId {
  int? code;
  List<TenantLocationDetails>? details;
  String? message;
  bool? status;

  GetLocationByTenantId({this.code, this.details, this.message, this.status});

  GetLocationByTenantId.fromJson(Map<String, dynamic> json) {
    code = json['code'];
    if (json['details'] != null) {
      details = <TenantLocationDetails>[];
      json['details'].forEach((v) {
        details!.add(new TenantLocationDetails.fromJson(v));
      });
    }
    message = json['message'];
    status = json['status'];
  }

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

class TenantLocationDetails {
  int? locationid;
  int? tenantid;
  int? moduleid;
  String? locationname;
  String? locationemail;
  String? locationcontact;
  String? locationlatitude;
  String? locationlong;
  String? locationaddress;
  String? locationsuburb;
  String? locationstate;
  String? locationcity;
  String? locationpostcode;
  String? opentime;
  String? closetime;
  int? partnerid;
  int? deliveryradius;
  int? deliverymins;
  int? cancelsecs;
  int? applocationid;

  TenantLocationDetails(
      {this.locationid,
        this.tenantid,
        this.moduleid,
        this.locationname,
        this.locationemail,
        this.locationcontact,
        this.locationlatitude,
        this.locationlong,
        this.locationaddress,
        this.locationsuburb,
        this.locationstate,
        this.locationcity,
        this.locationpostcode,
        this.opentime,
        this.closetime,
        this.partnerid,
        this.deliveryradius,
        this.deliverymins,
        this.cancelsecs,
        this.applocationid});

  TenantLocationDetails.fromJson(Map<String, dynamic> json) {
    locationid = json['locationid'];
    tenantid = json['tenantid'];
    moduleid = json['moduleid'];
    locationname = json['locationname'];
    locationemail = json['locationemail'];
    locationcontact = json['locationcontact'];
    locationlatitude = json['locationlatitude'];
    locationlong = json['locationlong'];
    locationaddress = json['locationaddress'];
    locationsuburb = json['locationsuburb'];
    locationstate = json['locationstate'];
    locationcity = json['locationcity'];
    locationpostcode = json['locationpostcode'];
    opentime = json['opentime'];
    closetime = json['closetime'];
    partnerid = json['partnerid'];
    deliveryradius = json['deliveryradius'];
    deliverymins = json['deliverymins'];
    cancelsecs = json['cancelsecs'];
    applocationid = json['applocationid'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['locationid'] = this.locationid;
    data['tenantid'] = this.tenantid;
    data['moduleid'] = this.moduleid;
    data['locationname'] = this.locationname;
    data['locationemail'] = this.locationemail;
    data['locationcontact'] = this.locationcontact;
    data['locationlatitude'] = this.locationlatitude;
    data['locationlong'] = this.locationlong;
    data['locationaddress'] = this.locationaddress;
    data['locationsuburb'] = this.locationsuburb;
    data['locationstate'] = this.locationstate;
    data['locationcity'] = this.locationcity;
    data['locationpostcode'] = this.locationpostcode;
    data['opentime'] = this.opentime;
    data['closetime'] = this.closetime;
    data['partnerid'] = this.partnerid;
    data['deliveryradius'] = this.deliveryradius;
    data['deliverymins'] = this.deliverymins;
    data['cancelsecs'] = this.cancelsecs;
    data['applocationid'] = this.applocationid;
    return data;
  }
}

