/*
 * @Author: wjc
 * @Date: 2022-04-18 10:59:15
 * @LastEditors: wjc
 * @LastEditTime: 2022-04-24 17:36:04
 * @Description: 
 */

class SmartDevicesDetailModel {
  DeviceOfSmartDevicesDetailModel? device;
  ControllerOfSmartDevicesDetailModel? controller;

  SmartDevicesDetailModel({
    this.device,
    this.controller,
  });

  SmartDevicesDetailModel.fromJson(json) {
    Map<String, dynamic> map = Map.from(json ?? {});

    device = DeviceOfSmartDevicesDetailModel.fromJson(map["device"] ?? {});
    controller =
        ControllerOfSmartDevicesDetailModel.fromJson(map["controller"] ?? {});
  }

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = Map<String, dynamic>();

    json['device'] = this.device?.toJson();
    json['controller'] = this.controller?.toJson();

    return json;
  }
}

class DeviceOfSmartDevicesDetailModel {
  String? area;
  String? name;
  String? type;
  String? typeId;
  String? serialNumber;

  DeviceOfSmartDevicesDetailModel({
    this.area,
    this.name,
    this.type,
    this.typeId,
    this.serialNumber,
  });

  DeviceOfSmartDevicesDetailModel.fromJson(json) {
    Map<String, dynamic> map = Map.from(json ?? {});

    area = map['area'];
    name = map['name'];
    type = map['type'];
    typeId = map['typeId'];
    serialNumber = map['serialNumber'];
  }

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = Map<String, dynamic>();

    json['area'] = this.area;
    json['name'] = this.name;
    json['type'] = this.type;
    json['typeId'] = this.typeId;
    json['serialNumber'] = this.serialNumber;

    return json;
  }
}

class ControllerOfSmartDevicesDetailModel {
  String? location;
  String? name;
  String? type;
  String? vendorNo;
  String? id;
  num? status;

  ControllerOfSmartDevicesDetailModel({
    this.location,
    this.name,
    this.type,
    this.vendorNo,
    this.id,
    this.status,
  });

  ControllerOfSmartDevicesDetailModel.fromJson(json) {
    Map<String, dynamic> map = Map.from(json ?? {});

    location = map['location'];
    name = map['name'];
    type = map['type'];
    vendorNo = map['vendorNo'];
    id = map['id'];
    status = map['status'];
  }

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = Map<String, dynamic>();

    json['location'] = this.location;
    json['name'] = this.name;
    json['type'] = this.type;
    json['vendorNo'] = this.vendorNo;
    json['id'] = this.id;
    json['status'] = this.status;

    return json;
  }
}
