2023-11-13 11:28:42 +08:00

541 lines
16 KiB
Dart

class LockSetInfoEntity {
int? errorCode;
String? description;
String? errorMsg;
LockSetInfoData? data;
LockSetInfoEntity(
{this.errorCode, this.description, this.errorMsg, this.data});
LockSetInfoEntity.fromJson(Map<String, dynamic> json) {
errorCode = json['errorCode'];
description = json['description'];
errorMsg = json['errorMsg'];
data = json['data'] != null ? LockSetInfoData.fromJson(json['data']) : null;
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['errorCode'] = errorCode;
data['description'] = description;
data['errorMsg'] = errorMsg;
if (this.data != null) {
data['data'] = this.data!.toJson();
}
return data;
}
}
class LockSetInfoData {
int? lockId;
LockStatus? lockStatus;
LockFeature? lockFeature;
LockBasicInfo? lockBasicInfo;
LockSettingInfo? lockSettingInfo;
LockSetInfoData({
this.lockId,
this.lockStatus,
this.lockFeature,
this.lockBasicInfo,
this.lockSettingInfo});
LockSetInfoData.fromJson(Map<String, dynamic> json) {
lockId = json['lockId'];
lockStatus = json['lockStatus'] != null
? LockStatus.fromJson(json['lockStatus'])
: null;
lockFeature = json['lockFeature'] != null
? LockFeature.fromJson(json['lockFeature'])
: null;
lockBasicInfo = json['lockBasicInfo'] != null
? LockBasicInfo.fromJson(json['lockBasicInfo'])
: null;
lockSettingInfo = json['lockSettingInfo'] != null
? LockSettingInfo.fromJson(json['lockSettingInfo'])
: null;
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['lockId'] = lockId;
if (lockStatus != null) {
data['lockStatus'] = lockStatus!.toJson();
}
if (lockFeature != null) {
data['lockFeature'] = lockFeature!.toJson();
}
if (lockBasicInfo != null) {
data['lockBasicInfo'] = lockBasicInfo!.toJson();
}
if (lockSettingInfo != null) {
data['lockSettingInfo'] = lockSettingInfo!.toJson();
}
return data;
}
}
class LockStatus {
int? roomStatus;
LockStatus({this.roomStatus});
LockStatus.fromJson(Map<String, dynamic> json) {
roomStatus = json['roomStatus'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['roomStatus'] = roomStatus;
return data;
}
}
class LockFeature {
int? password;
int? icCard;
int? fingerprint;
int? fingerVein;
int? palmVein;
int? d3Face;
int? qrCode;
int? bluetoothRemoteControl;
int? wirelessKey;
int? gatewayUnlock;
int? lockCommand;
int? firmwareUpgrade;
int? passwordIssue;
int? cardIssue;
int? fingerprintIssue;
int? fingerVeinIssue;
int? palmVeinIssue;
int? d3FaceIssue;
int? lockFreeze;
int? readAdminPassword;
int? passwordManagement;
int? passwordWithDelete;
int? remoteUnlock;
int? autoLock;
int? antiPrySwitch;
int? resetSwitch;
int? lockSwitch;
int? lockSound;
int? languageSetting;
int? realTimeClock;
int? wifi;
int? videoIntercom;
int? cyclePassword;
int? cycleFingerprintCard;
int? doubleAuthentication;
int? openDirection;
int? proximitySensing;
int? doorStatus;
int? wiredDoorMagnet;
int? wirelessDoorMagnet;
int? doorNotClosedAlarm;
int? unlockReminder;
int? wirelessKeyboard;
int? lightingTime;
int? passageMode;
int? hotelLockCardSystem;
int? appUnlockOnline;
int? bluetoothBroadcast;
int? attendance;
LockFeature(
{this.password,
this.icCard,
this.fingerprint,
this.fingerVein,
this.palmVein,
this.d3Face,
this.qrCode,
this.bluetoothRemoteControl,
this.wirelessKey,
this.gatewayUnlock,
this.lockCommand,
this.firmwareUpgrade,
this.passwordIssue,
this.cardIssue,
this.fingerprintIssue,
this.fingerVeinIssue,
this.palmVeinIssue,
this.d3FaceIssue,
this.lockFreeze,
this.readAdminPassword,
this.passwordManagement,
this.passwordWithDelete,
this.remoteUnlock,
this.autoLock,
this.antiPrySwitch,
this.resetSwitch,
this.lockSwitch,
this.lockSound,
this.languageSetting,
this.realTimeClock,
this.wifi,
this.videoIntercom,
this.cyclePassword,
this.cycleFingerprintCard,
this.doubleAuthentication,
this.openDirection,
this.proximitySensing,
this.doorStatus,
this.wiredDoorMagnet,
this.wirelessDoorMagnet,
this.doorNotClosedAlarm,
this.unlockReminder,
this.wirelessKeyboard,
this.lightingTime,
this.passageMode,
this.hotelLockCardSystem,
this.appUnlockOnline,
this.bluetoothBroadcast,
this.attendance});
LockFeature.fromJson(Map<String, dynamic> json) {
password = json['password'];
icCard = json['icCard'];
fingerprint = json['fingerprint'];
fingerVein = json['fingerVein'];
palmVein = json['palmVein'];
d3Face = json['d3Face'];
qrCode = json['qrCode'];
bluetoothRemoteControl = json['bluetoothRemoteControl'];
wirelessKey = json['wirelessKey'];
gatewayUnlock = json['gatewayUnlock'];
lockCommand = json['lockCommand'];
firmwareUpgrade = json['firmwareUpgrade'];
passwordIssue = json['passwordIssue'];
cardIssue = json['cardIssue'];
fingerprintIssue = json['fingerprintIssue'];
fingerVeinIssue = json['fingerVeinIssue'];
palmVeinIssue = json['palmVeinIssue'];
d3FaceIssue = json['d3FaceIssue'];
lockFreeze = json['lockFreeze'];
readAdminPassword = json['readAdminPassword'];
passwordManagement = json['passwordManagement'];
passwordWithDelete = json['passwordWithDelete'];
remoteUnlock = json['remoteUnlock'];
autoLock = json['autoLock'];
antiPrySwitch = json['antiPrySwitch'];
resetSwitch = json['resetSwitch'];
lockSwitch = json['lockSwitch'];
lockSound = json['lockSound'];
languageSetting = json['languageSetting'];
realTimeClock = json['realTimeClock'];
wifi = json['wifi'];
videoIntercom = json['videoIntercom'];
cyclePassword = json['cyclePassword'];
cycleFingerprintCard = json['cycleFingerprintCard'];
doubleAuthentication = json['doubleAuthentication'];
openDirection = json['openDirection'];
proximitySensing = json['proximitySensing'];
doorStatus = json['doorStatus'];
wiredDoorMagnet = json['wiredDoorMagnet'];
wirelessDoorMagnet = json['wirelessDoorMagnet'];
doorNotClosedAlarm = json['doorNotClosedAlarm'];
unlockReminder = json['unlockReminder'];
wirelessKeyboard = json['wirelessKeyboard'];
lightingTime = json['lightingTime'];
passageMode = json['passageMode'];
hotelLockCardSystem = json['hotelLockCardSystem'];
appUnlockOnline = json['appUnlockOnline'];
bluetoothBroadcast = json['bluetoothBroadcast'];
attendance = json['attendance'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['password'] = password;
data['icCard'] = icCard;
data['fingerprint'] = fingerprint;
data['fingerVein'] = fingerVein;
data['palmVein'] = palmVein;
data['d3Face'] = d3Face;
data['qrCode'] = qrCode;
data['bluetoothRemoteControl'] = bluetoothRemoteControl;
data['wirelessKey'] = wirelessKey;
data['gatewayUnlock'] = gatewayUnlock;
data['lockCommand'] = lockCommand;
data['firmwareUpgrade'] = firmwareUpgrade;
data['passwordIssue'] = passwordIssue;
data['cardIssue'] = cardIssue;
data['fingerprintIssue'] = fingerprintIssue;
data['fingerVeinIssue'] = fingerVeinIssue;
data['palmVeinIssue'] = palmVeinIssue;
data['d3FaceIssue'] = d3FaceIssue;
data['lockFreeze'] = lockFreeze;
data['readAdminPassword'] = readAdminPassword;
data['passwordManagement'] = passwordManagement;
data['passwordWithDelete'] = passwordWithDelete;
data['remoteUnlock'] = remoteUnlock;
data['autoLock'] = autoLock;
data['antiPrySwitch'] = antiPrySwitch;
data['resetSwitch'] = resetSwitch;
data['lockSwitch'] = lockSwitch;
data['lockSound'] = lockSound;
data['languageSetting'] = languageSetting;
data['realTimeClock'] = realTimeClock;
data['wifi'] = wifi;
data['videoIntercom'] = videoIntercom;
data['cyclePassword'] = cyclePassword;
data['cycleFingerprintCard'] = cycleFingerprintCard;
data['doubleAuthentication'] = doubleAuthentication;
data['openDirection'] = openDirection;
data['proximitySensing'] = proximitySensing;
data['doorStatus'] = doorStatus;
data['wiredDoorMagnet'] = wiredDoorMagnet;
data['wirelessDoorMagnet'] = wirelessDoorMagnet;
data['doorNotClosedAlarm'] = doorNotClosedAlarm;
data['unlockReminder'] = unlockReminder;
data['wirelessKeyboard'] = wirelessKeyboard;
data['lightingTime'] = lightingTime;
data['passageMode'] = passageMode;
data['hotelLockCardSystem'] = hotelLockCardSystem;
data['appUnlockOnline'] = appUnlockOnline;
data['bluetoothBroadcast'] = bluetoothBroadcast;
data['attendance'] = attendance;
return data;
}
}
class LockBasicInfo {
int? keyId;
String? model;
int? electricQuantity;
int? indate;
int? isLockOwner;
String? lockAlias;
int? groupId;
List<GroupData>? groupData;
String? adminPwd;
int? keyType;
int? startDate;
int? endDate;
String? mac;
LockBasicInfo(
{this.keyId,
this.model,
this.electricQuantity,
this.indate,
this.isLockOwner,
this.lockAlias,
this.groupId,
this.groupData,
this.adminPwd,
this.keyType,
this.startDate,
this.endDate,
this.mac});
LockBasicInfo.fromJson(Map<String, dynamic> json) {
keyId = json['keyId'];
model = json['model'];
electricQuantity = json['electricQuantity'];
indate = json['indate'];
isLockOwner = json['isLockOwner'];
lockAlias = json['lockAlias'];
groupId = json['groupId'];
if (json['groupData'] != null) {
groupData = <GroupData>[];
json['groupData'].forEach((v) {
groupData!.add(GroupData.fromJson(v));
});
}
adminPwd = json['adminPwd'];
keyType = json['keyType'];
startDate = json['startDate'];
endDate = json['endDate'];
mac = json['mac'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['keyId'] = keyId;
data['model'] = model;
data['electricQuantity'] = electricQuantity;
data['indate'] = indate;
data['isLockOwner'] = isLockOwner;
data['lockAlias'] = lockAlias;
data['groupId'] = groupId;
if (groupData != null) {
data['groupData'] = groupData!.map((v) => v.toJson()).toList();
}
data['adminPwd'] = adminPwd;
data['keyType'] = keyType;
data['startDate'] = startDate;
data['endDate'] = endDate;
data['mac'] = mac;
return data;
}
}
class GroupData {
int? id;
String? name;
GroupData({this.id, this.name});
GroupData.fromJson(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['id'] = id;
data['name'] = name;
return data;
}
}
class LockSettingInfo {
int? remoteUnlock;
int? autoLock;
int? autoLockSecond;
int? antiPrySwitch;
int? resetSwitch;
int? lockSwitch;
int? lockSound;
int? lockSoundVolume;
int? languageSettingLang;
int? openDirectionValue;
int? doorNotClosedAlarm;
int? unlockReminder;
int? lightingTime;
int? lightingSecond;
int? passageMode;
List<PassageModeConfig>? passageModeConfig;
int? attendance;
int? appUnlockOnline;
int? bluetoothBroadcast;
String? adminPwd;
int? unlockReminderPush;
String? languageSettingLangText;
int? motorTorsion;
int? stayWarn;
int? abnormalWarn;
LockSettingInfo(
{this.remoteUnlock,
this.autoLock,
this.autoLockSecond,
this.antiPrySwitch,
this.resetSwitch,
this.lockSwitch,
this.lockSound,
this.lockSoundVolume,
this.languageSettingLang,
this.openDirectionValue,
this.doorNotClosedAlarm,
this.unlockReminder,
this.lightingTime,
this.lightingSecond,
this.passageMode,
this.passageModeConfig,
this.attendance,
this.appUnlockOnline,
this.bluetoothBroadcast,
this.adminPwd,
this.unlockReminderPush,
this.languageSettingLangText,
this.motorTorsion,
this.stayWarn,
this.abnormalWarn,});
LockSettingInfo.fromJson(Map<String, dynamic> json) {
remoteUnlock = json['remoteUnlock'];
autoLock = json['autoLock'];
autoLockSecond = json['autoLockSecond'];
antiPrySwitch = json['antiPrySwitch'];
resetSwitch = json['resetSwitch'];
lockSwitch = json['lockSwitch'];
lockSound = json['lockSound'];
lockSoundVolume = json['lockSoundVolume'];
languageSettingLang = json['languageSettingLang'];
openDirectionValue = json['openDirectionValue'];
doorNotClosedAlarm = json['doorNotClosedAlarm'];
unlockReminder = json['unlockReminder'];
lightingTime = json['lightingTime'];
lightingSecond = json['lightingSecond'];
passageMode = json['passageMode'];
if (json['passageModeConfig'] != null) {
passageModeConfig = <PassageModeConfig>[];
json['passageModeConfig'].forEach((v) {
passageModeConfig!.add(PassageModeConfig.fromJson(v));
});
}
attendance = json['attendance'];
appUnlockOnline = json['appUnlockOnline'];
bluetoothBroadcast = json['bluetoothBroadcast'];
adminPwd = json['adminPwd'];
unlockReminderPush = json['unlockReminderPush'];
languageSettingLangText = json['languageSettingLangText'];
motorTorsion = json['motorTorsion'];
stayWarn = json['stayWarn'];
abnormalWarn = json['abnormalWarn'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['remoteUnlock'] = remoteUnlock;
data['autoLock'] = autoLock;
data['autoLockSecond'] = autoLockSecond;
data['antiPrySwitch'] = antiPrySwitch;
data['resetSwitch'] = resetSwitch;
data['lockSwitch'] = lockSwitch;
data['lockSound'] = lockSound;
data['lockSoundVolume'] = lockSoundVolume;
data['languageSettingLang'] = languageSettingLang;
data['openDirectionValue'] = openDirectionValue;
data['doorNotClosedAlarm'] = doorNotClosedAlarm;
data['unlockReminder'] = unlockReminder;
data['lightingTime'] = lightingTime;
data['lightingSecond'] = lightingSecond;
data['passageMode'] = passageMode;
if (passageModeConfig != null) {
data['passageModeConfig'] =
passageModeConfig!.map((v) => v.toJson()).toList();
}
data['attendance'] = attendance;
data['appUnlockOnline'] = appUnlockOnline;
data['bluetoothBroadcast'] = bluetoothBroadcast;
data['adminPwd'] = adminPwd;
data['unlockReminderPush'] = unlockReminderPush;
data['languageSettingLangText'] = languageSettingLangText;
data['motorTorsion'] = motorTorsion;
data['stayWarn'] = stayWarn;
data['abnormalWarn'] = abnormalWarn;
return data;
}
}
class PassageModeConfig {
int? startDate;
int? endDate;
List<int>? weekDays;
int? isAllDay;
PassageModeConfig(
{this.startDate, this.endDate, this.weekDays, this.isAllDay});
PassageModeConfig.fromJson(Map<String, dynamic> json) {
startDate = json['startDate'];
endDate = json['endDate'];
weekDays = json['weekDays'].cast<int>();
isAllDay = json['isAllDay'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['startDate'] = startDate;
data['endDate'] = endDate;
data['weekDays'] = weekDays;
data['isAllDay'] = isAllDay;
return data;
}
}