class KeyDetailEntity { int? errorCode; String? description; String? errorMsg; LockData? data; KeyDetailEntity({this.errorCode, this.description, this.errorMsg, this.data}); KeyDetailEntity.fromJson(Map json) { errorCode = json['errorCode']; description = json['description']; errorMsg = json['errorMsg']; data = json['data'] != null ? LockData.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 LockData { int? keyId; int? lockId; String? lockName; String? lockAlias; int? userType; int? keyStatus; int? startDate; int? endDate; int? keyRight; int? keyType; String? remarks; int? remoteEnable; int? appUnlockMustOnline; int? lockUserNo; LockItem? lockData; String? lockMac; String? noKeyPwd; int? electricQuantity; String? featureValue; int? groupId; String? groupName; LockData( {this.keyId, this.lockId, this.lockName, this.lockAlias, this.userType, this.keyStatus, this.startDate, this.endDate, this.keyRight, this.keyType, this.remarks, this.remoteEnable, this.appUnlockMustOnline, this.lockUserNo, this.lockData, this.lockMac, this.noKeyPwd, this.electricQuantity, this.featureValue, this.groupId, this.groupName}); LockData.fromJson(Map json) { keyId = json['keyId']; lockId = json['lockId']; lockName = json['lockName']; lockAlias = json['lockAlias']; userType = json['userType']; keyStatus = json['keyStatus']; json['startDate'] != null ? startDate = json['startDate'] : 0; json['endDate'] != null ? endDate = json['endDate'] : 0; keyRight = json['keyRight']; keyType = json['keyType']; json['remarks'] != null ? remarks = json['remarks'] : ""; json['remoteEnable'] != null ? remoteEnable = json['remoteEnable'] : 0; json['appUnlockMustOnline'] != null ? appUnlockMustOnline = json['appUnlockMustOnline'] : 0; json['lockUserNo'] != null ? lockUserNo = json['lockUserNo'] : 0; lockData = json['lockData'] != null ? LockItem.fromJson(json['lockData']) : null; lockMac = json['lockMac']; json['noKeyPwd'] != null ? noKeyPwd = json['noKeyPwd'] : 0; json['electricQuantity'] != null ? electricQuantity = json['electricQuantity'] : 0; json['featureValue'] != null ? featureValue = json['featureValue'] : ""; json['groupId'] != null ? groupId = json['groupId'] : 0; groupName = json['groupName']; } Map toJson() { final Map data = {}; data['keyId'] = keyId; data['lockId'] = lockId; data['lockName'] = lockName; data['lockAlias'] = lockAlias; data['userType'] = userType; data['keyStatus'] = keyStatus; data['startDate'] = startDate; data['endDate'] = endDate; data['keyRight'] = keyRight; data['keyType'] = keyType; data['remarks'] = remarks; data['remoteEnable'] = remoteEnable; data['appUnlockMustOnline'] = appUnlockMustOnline; data['lockUserNo'] = lockUserNo; if (lockData != null) { data['lockData'] = lockData!.toJson(); } data['lockMac'] = lockMac; data['noKeyPwd'] = noKeyPwd; data['electricQuantity'] = electricQuantity; data['featureValue'] = featureValue; data['groupId'] = groupId; data['groupName'] = groupName; return data; } } class LockItem { String? lockName; String? lockMac; LockItem({this.lockName, this.lockMac}); LockItem.fromJson(Map json) { lockName = json['lockName']; lockMac = json['lockMac']; } Map toJson() { final Map data = {}; data['lockName'] = lockName; data['lockMac'] = lockMac; return data; } }