class GetewayDataEntity { int? errorCode; String? description; String? errorMsg; GetewayListData? data; GetewayDataEntity( {this.errorCode, this.description, this.errorMsg, this.data}); GetewayDataEntity.fromJson(Map json) { errorCode = json['errorCode']; description = json['description']; errorMsg = json['errorMsg']; data = json['data'] != null ? GetewayListData.fromJson(json['data']) : null; } Map toJson() { final Map data = {}; data['errorCode'] = errorCode; data['description'] = description; data['errorMsg'] = errorMsg; if (this.data != null) { data['data'] = this.data!.toJson(); } return data; } } class GetewayListData { List? list; int? pageNo; int? pageSize; int? pages; int? total; GetewayListData({this.list, this.pageNo, this.pageSize, this.pages, this.total}); GetewayListData.fromJson(Map json) { if (json['list'] != null) { list = []; json['list'].forEach((v) { list!.add(GetewayItemData.fromJson(v)); }); } pageNo = json['pageNo']; pageSize = json['pageSize']; pages = json['pages']; total = json['total']; } Map toJson() { final Map data = {}; if (list != null) { data['list'] = list!.map((v) => v.toJson()).toList(); } data['pageNo'] = pageNo; data['pageSize'] = pageSize; data['pages'] = pages; data['total'] = total; return data; } } class GetewayItemData { String? serialNumber; int? plugId; String? plugName; String? networkName; int? lockNum; String? plugMac; String? networkMac; int? isOnline; String? plugVersion; int? select = 0; GetewayItemData( {this.serialNumber, this.plugId, this.plugName, this.networkName, this.lockNum, this.plugMac, this.networkMac, this.isOnline, this.plugVersion}); GetewayItemData.fromJson(Map json) { serialNumber = json['serialNumber']; plugId = json['plugId']; plugName = json['plugName']; networkName = json['networkName']; lockNum = json['lockNum']; plugMac = json['plugMac']; networkMac = json['networkMac']; isOnline = json['isOnline']; plugVersion = json['plugVersion']; } Map toJson() { final Map data = {}; data['serialNumber'] = serialNumber; data['plugId'] = plugId; data['plugName'] = plugName; data['networkName'] = networkName; data['lockNum'] = lockNum; data['plugMac'] = plugMac; data['networkMac'] = networkMac; data['isOnline'] = isOnline; data['plugVersion'] = plugVersion; return data; } }