class LockListInfoEntity { LockListInfoEntity( {this.errorCode, this.description, this.errorMsg, this.data}); LockListInfoEntity.fromJson(Map json) { errorCode = json['errorCode']; description = json['description']; errorMsg = json['errorMsg']; data = json['data'] != null ? LockListInfoGroupEntity.fromJson(json['data']) : null; } int? errorCode; String? description; String? errorMsg; LockListInfoGroupEntity? data; 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 LockListInfoGroupEntity { LockListInfoGroupEntity( {this.groupList, this.pageNo, this.pageSize, this.pages, this.total}); LockListInfoGroupEntity.fromJson(Map json) { if (json['groupList'] != null) { groupList = []; json['groupList'].forEach((v) { groupList!.add(GroupList.fromJson(v)); }); } pageNo = json['pageNo']; pageSize = json['pageSize']; pages = json['pages']; total = json['total']; } List? groupList; int? pageNo; int? pageSize; int? pages; int? total; Map toJson() { final Map data = {}; if (groupList != null) { data['groupList'] = groupList!.map((v) => v.toJson()).toList(); } data['pageNo'] = pageNo; data['pageSize'] = pageSize; data['pages'] = pages; data['total'] = total; return data; } } class GroupList { GroupList({this.groupName, this.groupId, this.lockList}); GroupList.fromJson(Map json) { groupName = json['groupName']; groupId = json['groupId']; if (json['lockList'] != null) { lockList = []; json['lockList'].forEach((v) { lockList!.add(LockListInfoItemEntity.fromJson(v)); }); } } String? groupName; int? groupId; List? lockList; bool _isChecked = false; bool get isChecked => _isChecked ?? false; set isChecked(bool value) => _isChecked = value; Map toJson() { final Map data = {}; data['groupName'] = groupName; data['groupId'] = groupId; if (lockList != null) { data['lockList'] = lockList!.map((v) => v.toJson()).toList(); } return data; } GroupList copy() { return GroupList( groupName: groupName, groupId: groupId, lockList: lockList?.map((e) => e.copy()).toList(), ); } } class LockListInfoItemEntity { LockListInfoItemEntity({ this.keyId, this.lockId, this.lockName, this.lockAlias, this.electricQuantity, this.fwVersion, this.hwVersion, this.keyType, this.passageMode, this.userType, this.startDate, this.endDate, this.weekDays, this.remoteEnable, this.faceAuthentication, this.lastFaceValidateTime, this.nextFaceValidateTime, this.keyRight, this.keyStatus, this.isLockOwner, this.bluetooth, this.lockFeature, this.lockSetting, this.sendDate, this.lockUserNo, this.electricQuantityDate, this.electricQuantityStandby, this.senderUserId, this.isOnlyManageSelf, this.restoreCount, this.model, this.vendor, this.hasGateway, this.appUnlockOnline, this.mac, this.initUserNo, this.updateDate, }); LockListInfoItemEntity.fromJson(Map json) { keyId = json['keyId']; lockId = json['lockId']; lockName = json['lockName']; lockAlias = json['lockAlias']; electricQuantity = json['electricQuantity']; fwVersion = json['fwVersion']; hwVersion = json['hwVersion']; keyType = json['keyType']; passageMode = json['passageMode']; userType = json['userType']; startDate = json['startDate']; endDate = json['endDate']; weekDays = json['weekDays']; remoteEnable = json['remoteEnable']; faceAuthentication = json['faceAuthentication']; lastFaceValidateTime = json['lastFaceValidateTime']; nextFaceValidateTime = json['nextFaceValidateTime']; keyRight = json['keyRight']; keyStatus = json['keyStatus']; isLockOwner = json['isLockOwner']; sendDate = json['sendDate']; lockUserNo = json['lockUserNo']; senderUserId = json['senderUserId']; electricQuantityDate = json['electricQuantityDate']; electricQuantityStandby = json['electricQuantityStandby']; isOnlyManageSelf = json['isOnlyManageSelf']; restoreCount = json['restoreCount']; model = json['model']; vendor = json['vendor']; bluetooth = json['bluetooth'] != null ? Bluetooth.fromJson(json['bluetooth']) : null; lockFeature = json['lockFeature'] != null ? LockFeature.fromJson(json['lockFeature']) : null; lockSetting = json['lockSetting'] != null ? LockSetting.fromJson(json['lockSetting']) : null; hasGateway = json['hasGateway']; appUnlockOnline = json['appUnlockOnline']; mac = json['mac']; initUserNo = json['initUserNo']; updateDate = json['updateDate']; } int? keyId; int? lockId; String? lockName; String? lockAlias; int? electricQuantity; String? fwVersion; String? hwVersion; int? keyType; int? passageMode; int? userType; int? startDate; int? endDate; List? weekDays; int? remoteEnable; int? faceAuthentication; //是否实名认证:0-未知,1-是,2-否 int? lastFaceValidateTime; int? nextFaceValidateTime; //下次人脸认证时间 int? keyRight; int? keyStatus; int? isLockOwner; int? sendDate; int? lockUserNo; int? senderUserId; int? electricQuantityDate; int? electricQuantityStandby; int? isOnlyManageSelf; int? restoreCount; String? model; String? vendor; Bluetooth? bluetooth; LockFeature? lockFeature; LockSetting? lockSetting; int? hasGateway; int? appUnlockOnline; String? mac; int? initUserNo; int? updateDate; Map toJson() { final Map data = {}; data['keyId'] = keyId; data['lockId'] = lockId; data['lockName'] = lockName; data['lockAlias'] = lockAlias; data['electricQuantity'] = electricQuantity; data['fwVersion'] = fwVersion; data['hwVersion'] = hwVersion; data['keyType'] = keyType; data['passageMode'] = passageMode; data['userType'] = userType; data['startDate'] = startDate; data['endDate'] = endDate; data['weekDays'] = weekDays; data['remoteEnable'] = remoteEnable; data['faceAuthentication'] = faceAuthentication; data['lastFaceValidateTime'] = lastFaceValidateTime; data['nextFaceValidateTime'] = nextFaceValidateTime; data['keyRight'] = keyRight; data['keyStatus'] = keyStatus; data['isLockOwner'] = isLockOwner; data['sendDate'] = sendDate; data['lockUserNo'] = lockUserNo; data['senderUserId'] = senderUserId; data['electricQuantityDate'] = electricQuantityDate; data['electricQuantityStandby'] = electricQuantityStandby; data['isOnlyManageSelf'] = isOnlyManageSelf; data['restoreCount'] = restoreCount; data['model'] = model; data['vendor'] = vendor; if (bluetooth != null) { data['bluetooth'] = bluetooth!.toJson(); } if (lockFeature != null) { data['lockFeature'] = lockFeature!.toJson(); } if (lockSetting != null) { data['lockSetting'] = lockSetting!.toJson(); } data['hasGateway'] = hasGateway; data['appUnlockOnline'] = appUnlockOnline; data['mac'] = mac; data['initUserNo'] = initUserNo; data['updateDate'] = updateDate; return data; } //是否是锁拥有者 也代表是超级管理员 bool isLockOwnerBool() { return isLockOwner == 1; } LockListInfoItemEntity copy() { return LockListInfoItemEntity.fromJson(toJson()); } } class Bluetooth { Bluetooth( {this.bluetoothDeviceId, this.bluetoothDeviceName, this.publicKey, this.privateKey, this.signKey}); Bluetooth.fromJson(Map json) { bluetoothDeviceId = json['bluetoothDeviceId']; bluetoothDeviceName = json['bluetoothDeviceName']; publicKey = json['publicKey'].cast(); privateKey = json['privateKey'].cast(); signKey = json['signKey'].cast(); } String? bluetoothDeviceId; String? bluetoothDeviceName; List? publicKey; List? privateKey; List? signKey; Map toJson() { final Map data = {}; data['bluetoothDeviceId'] = bluetoothDeviceId; data['bluetoothDeviceName'] = bluetoothDeviceName; data['publicKey'] = publicKey; data['privateKey'] = privateKey; data['signKey'] = signKey; return data; } } class LockFeature { LockFeature({ this.password, this.icCard, this.fingerprint, this.fingerVein, this.palmVein, this.isSupportIris, this.d3Face, this.bluetoothRemoteControl, this.videoIntercom, this.isSupportCatEye, this.isSupportBackupBattery, this.isNoSupportedBlueBroadcast, }); LockFeature.fromJson(Map json) { password = json['password']; icCard = json['icCard']; fingerprint = json['fingerprint']; fingerVein = json['fingerVein']; palmVein = json['palmVein']; isSupportIris = json['isSupportIris']; d3Face = json['d3Face']; bluetoothRemoteControl = json['bluetoothRemoteControl']; videoIntercom = json['videoIntercom']; isSupportCatEye = json['isSupportCatEye']; isSupportBackupBattery = json['isSupportBackupBattery']; isNoSupportedBlueBroadcast = json['isNoSupportedBlueBroadcast']; } int? password; int? icCard; int? fingerprint; int? fingerVein; int? palmVein; int? isSupportIris; int? d3Face; int? bluetoothRemoteControl; int? videoIntercom; int? isSupportCatEye; int? isSupportBackupBattery; int? isNoSupportedBlueBroadcast; Map toJson() { final Map data = {}; data['password'] = password; data['icCard'] = icCard; data['fingerprint'] = fingerprint; data['fingerVein'] = fingerVein; data['palmVein'] = palmVein; data['isSupportIris'] = isSupportIris; data['d3Face'] = d3Face; data['bluetoothRemoteControl'] = bluetoothRemoteControl; data['videoIntercom'] = videoIntercom; data['isSupportCatEye'] = isSupportCatEye; data['isSupportBackupBattery'] = isSupportBackupBattery; data['isNoSupportedBlueBroadcast'] = isNoSupportedBlueBroadcast; return data; } } class LockSetting { LockSetting({ this.attendance, this.appUnlockOnline, this.remoteUnlock, }); LockSetting.fromJson(Map json) { attendance = json['attendance']; appUnlockOnline = json['appUnlockOnline']; remoteUnlock = json['remoteUnlock']; } int? attendance; int? appUnlockOnline; int? remoteUnlock; Map toJson() { final Map data = {}; data['attendance'] = attendance; data['appUnlockOnline'] = appUnlockOnline; data['remoteUnlock'] = remoteUnlock; return data; } }