748 lines
22 KiB
Dart
Executable File
748 lines
22 KiB
Dart
Executable File
import 'package:star_lock/main/lockMian/entity/lockListInfo_entity.dart';
|
|
|
|
class LockSetInfoEntity {
|
|
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;
|
|
}
|
|
|
|
int? errorCode;
|
|
String? description;
|
|
String? errorMsg;
|
|
LockSetInfoData? data;
|
|
|
|
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 {
|
|
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;
|
|
}
|
|
|
|
int? lockId;
|
|
LockStatus? lockStatus;
|
|
LockFeature? lockFeature;
|
|
LockBasicInfo? lockBasicInfo;
|
|
LockSettingInfo? lockSettingInfo;
|
|
|
|
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 {
|
|
LockStatus({this.roomStatus});
|
|
|
|
LockStatus.fromJson(Map<String, dynamic> json) {
|
|
roomStatus = json['roomStatus'];
|
|
}
|
|
|
|
int? roomStatus;
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
data['roomStatus'] = roomStatus;
|
|
return data;
|
|
}
|
|
}
|
|
|
|
class LockFeature {
|
|
//人脸开关 0:关闭 1:开启
|
|
|
|
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.isSupportCatEye,
|
|
this.hotelLockCardSystem,
|
|
this.appUnlockOnline,
|
|
this.bluetoothBroadcast,
|
|
this.attendance,
|
|
this.motorTorsion,
|
|
this.stayWarn,
|
|
this.abnormalWarn,
|
|
this.isSupportBackupBattery,
|
|
this.isElectronicAntiLock,
|
|
this.isVisualDoorBellCode,
|
|
this.isDoubleLockLinkage,
|
|
});
|
|
|
|
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'];
|
|
isSupportCatEye = json['isSupportCatEye'];
|
|
hotelLockCardSystem = json['hotelLockCardSystem'];
|
|
appUnlockOnline = json['appUnlockOnline'];
|
|
bluetoothBroadcast = json['bluetoothBroadcast'];
|
|
attendance = json['attendance'];
|
|
motorTorsion = json['motorTorsion'];
|
|
stayWarn = json['stayWarn'];
|
|
abnormalWarn = json['abnormalWarn'];
|
|
isSupportBackupBattery = json['isSupportBackupBattery'];
|
|
isElectronicAntiLock = json['isElectronicAntiLock'];
|
|
isVisualDoorBellCode = json['isVisualDoorBellCode'];
|
|
isDoubleLockLinkage = json['isDoubleLockLinkage'];
|
|
}
|
|
|
|
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? isSupportCatEye;
|
|
int? hotelLockCardSystem;
|
|
int? appUnlockOnline;
|
|
int? bluetoothBroadcast;
|
|
int? attendance;
|
|
int? motorTorsion;
|
|
int? stayWarn;
|
|
int? abnormalWarn;
|
|
int? isSupportBackupBattery;
|
|
int? isElectronicAntiLock;
|
|
int? isVisualDoorBellCode;
|
|
int? isDoubleLockLinkage;
|
|
|
|
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['isSupportCatEye'] = isSupportCatEye;
|
|
data['hotelLockCardSystem'] = hotelLockCardSystem;
|
|
data['appUnlockOnline'] = appUnlockOnline;
|
|
data['bluetoothBroadcast'] = bluetoothBroadcast;
|
|
data['attendance'] = attendance;
|
|
data['motorTorsion'] = motorTorsion;
|
|
data['stayWarn'] = stayWarn;
|
|
data['abnormalWarn'] = abnormalWarn;
|
|
data['isSupportBackupBattery'] = isSupportBackupBattery;
|
|
data['isElectronicAntiLock'] = isElectronicAntiLock;
|
|
data['isVisualDoorBellCode'] = isVisualDoorBellCode;
|
|
data['isDoubleLockLinkage'] = isDoubleLockLinkage;
|
|
return data;
|
|
}
|
|
}
|
|
|
|
class LockBasicInfo {
|
|
LockBasicInfo(
|
|
{this.lockId,
|
|
this.electricQuantityDate,
|
|
this.keyId,
|
|
this.model,
|
|
this.electricQuantity,
|
|
this.electricQuantityStandby,
|
|
this.indate,
|
|
this.isLockOwner,
|
|
this.lockAlias,
|
|
this.lockName,
|
|
this.groupId,
|
|
this.groupName,
|
|
this.groupData,
|
|
this.adminPwd,
|
|
this.keyType,
|
|
this.startDate,
|
|
this.endDate,
|
|
this.mac,
|
|
this.keyRight,
|
|
this.senderUserId,
|
|
this.lockUserNo,
|
|
this.weekDays,
|
|
this.address,
|
|
this.network,
|
|
this.vendor,
|
|
this.networkInfo});
|
|
|
|
LockBasicInfo.fromJson(Map<String, dynamic> json) {
|
|
lockId = json['lockId'];
|
|
electricQuantityDate = json['electricQuantityDate'];
|
|
keyId = json['keyId'];
|
|
model = json['model'];
|
|
electricQuantity = json['electricQuantity'];
|
|
electricQuantityStandby = json['electricQuantityStandby'];
|
|
indate = json['indate'];
|
|
isLockOwner = json['isLockOwner'];
|
|
lockAlias = json['lockAlias'];
|
|
lockName = json['lockName'];
|
|
groupId = json['groupId'];
|
|
groupName = json['groupName'];
|
|
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'];
|
|
keyRight = json['keyRight'];
|
|
senderUserId = json['senderUserId'];
|
|
lockUserNo = json['lockUserNo'];
|
|
weekDays = json['weekDays'];
|
|
address = json['address'];
|
|
network = json['network'];
|
|
vendor = json['vendor'];
|
|
networkInfo = json['networkInfo'] != null
|
|
? NetworkInfo.fromJson(json['networkInfo'])
|
|
: null;
|
|
}
|
|
|
|
int? lockId;
|
|
int? electricQuantityDate;
|
|
int? keyId;
|
|
String? model;
|
|
int? electricQuantity;
|
|
int? electricQuantityStandby;
|
|
int? indate;
|
|
int? isLockOwner;
|
|
String? lockAlias;
|
|
String? lockName;
|
|
int? groupId;
|
|
String? groupName;
|
|
List<GroupData>? groupData;
|
|
String? adminPwd;
|
|
int? keyType;
|
|
int? startDate;
|
|
int? endDate;
|
|
String? mac;
|
|
int? keyRight;
|
|
int? senderUserId;
|
|
int? lockUserNo;
|
|
List? weekDays;
|
|
String? address;
|
|
String? network;
|
|
String? vendor;
|
|
NetworkInfo? networkInfo;
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
data['lockId'] = lockId;
|
|
data['electricQuantityDate'] = electricQuantityDate;
|
|
data['keyId'] = keyId;
|
|
data['model'] = model;
|
|
data['electricQuantity'] = electricQuantity;
|
|
data['electricQuantityStandby'] = electricQuantityStandby;
|
|
data['indate'] = indate;
|
|
data['isLockOwner'] = isLockOwner;
|
|
data['lockAlias'] = lockAlias;
|
|
data['lockName'] = lockName;
|
|
data['groupId'] = groupId;
|
|
data['groupName'] = groupName;
|
|
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;
|
|
data['keyRight'] = keyRight;
|
|
data['senderUserId'] = senderUserId;
|
|
data['lockUserNo'] = lockUserNo;
|
|
data['weekDays'] = weekDays;
|
|
data['address'] = address;
|
|
data['network'] = network;
|
|
data['vendor'] = vendor;
|
|
if (networkInfo != null) {
|
|
data['networkInfo'] = networkInfo!.toJson();
|
|
}
|
|
return data;
|
|
}
|
|
}
|
|
|
|
class GroupData {
|
|
GroupData({this.id, this.name});
|
|
|
|
GroupData.fromJson(Map<String, dynamic> json) {
|
|
id = json['id'];
|
|
name = json['name'];
|
|
}
|
|
|
|
int? id;
|
|
String? name;
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
data['id'] = id;
|
|
data['name'] = name;
|
|
return data;
|
|
}
|
|
}
|
|
|
|
class LockSettingInfo {
|
|
// 防误开
|
|
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,
|
|
this.catEyeConfig,
|
|
this.faceSwitch,
|
|
this.faceAutoLightScreen,
|
|
this.faceInductionDistance,
|
|
this.autoLightScreen,
|
|
this.autoLightScreenTime,
|
|
this.faceEnErrUnlock,
|
|
});
|
|
|
|
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'];
|
|
if (json['catEyeConfig'] != null) {
|
|
catEyeConfig = (json['catEyeConfig'] as List)
|
|
.map((item) => CatEyeConfig.fromJson(item))
|
|
.toList();
|
|
} else {
|
|
catEyeConfig = [];
|
|
}
|
|
|
|
faceSwitch = json['faceSwitch'];
|
|
faceAutoLightScreen = json['faceAutoLightScreen'];
|
|
faceInductionDistance = json['faceInductionDistance'];
|
|
autoLightScreen = json['autoLightScreen'];
|
|
autoLightScreenTime = json['autoLightScreenTime'];
|
|
faceEnErrUnlock = json['faceEnErrUnlock'];
|
|
}
|
|
|
|
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;
|
|
List<CatEyeConfig>? catEyeConfig;
|
|
int? faceSwitch; //人脸开关 0:关闭 1:开启
|
|
int? faceAutoLightScreen; //人脸自动亮屏开关 0:关闭 1:开启
|
|
int? faceInductionDistance; //人脸感应距离
|
|
// int? faceAntiMistakeOpen; //人脸防误开门 0:关闭 1:开启
|
|
int? autoLightScreen; //猫眼-自动亮屏开关 0:关闭 1:开启
|
|
int? autoLightScreenTime; //猫眼-自动亮屏时间
|
|
int? faceEnErrUnlock;
|
|
|
|
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;
|
|
if (catEyeConfig != null) {
|
|
data['catEyeConfig'] = catEyeConfig!.map((v) => v.toJson()).toList();
|
|
}
|
|
data['faceSwitch'] = faceSwitch;
|
|
data['faceAutoLightScreen'] = faceAutoLightScreen;
|
|
data['faceInductionDistance'] = faceInductionDistance;
|
|
data['autoLightScreen'] = autoLightScreen;
|
|
data['autoLightScreenTime'] = autoLightScreenTime;
|
|
data['faceEnErrUnlock'] = faceEnErrUnlock;
|
|
|
|
return data;
|
|
}
|
|
}
|
|
|
|
class PassageModeConfig {
|
|
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'];
|
|
}
|
|
|
|
int? startDate;
|
|
int? endDate;
|
|
List<int>? weekDays;
|
|
int? 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;
|
|
}
|
|
}
|
|
|
|
// 定义 CatEyeConfig 类
|
|
class CatEyeConfig {
|
|
CatEyeConfig({
|
|
this.catEyeMode,
|
|
this.catEyeModeConfig,
|
|
});
|
|
|
|
// 从 JSON 数据构造对象
|
|
factory CatEyeConfig.fromJson(Map<String, dynamic> json) {
|
|
return CatEyeConfig(
|
|
catEyeMode: json['catEyeMode']?.toInt() ?? 0,
|
|
catEyeModeConfig:
|
|
CatEyeModeConfig.fromJson(json['catEyeModeConfig'] ?? {}),
|
|
);
|
|
}
|
|
|
|
int? catEyeMode;
|
|
CatEyeModeConfig? catEyeModeConfig;
|
|
|
|
// 将对象转换为 JSON 数据
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
data['catEyeMode'] = catEyeMode;
|
|
if (catEyeModeConfig != null) {
|
|
data['catEyeModeConfig'] = catEyeModeConfig!.toJson();
|
|
}
|
|
|
|
return data;
|
|
}
|
|
}
|
|
|
|
// 定义 CatEyeModeConfig 类
|
|
class CatEyeModeConfig {
|
|
CatEyeModeConfig({
|
|
this.recordMode,
|
|
this.recordTime,
|
|
this.realTimeMode,
|
|
this.recordEndTime,
|
|
this.recordStartTime,
|
|
this.detectionDistance,
|
|
});
|
|
|
|
// 从 JSON 数据构造对象
|
|
factory CatEyeModeConfig.fromJson(Map<String, dynamic> json) {
|
|
return CatEyeModeConfig(
|
|
recordMode: json['recordMode'] != null ? int.tryParse(json['recordMode'].toString()) : null,
|
|
recordTime: json['recordTime'],
|
|
realTimeMode: json['realTimeMode'] != null ? int.tryParse(json['realTimeMode'].toString()) : null,
|
|
recordEndTime: json['recordEndTime'] != null ? int.tryParse(json['recordEndTime'].toString()) : null,
|
|
recordStartTime: json['recordStartTime'] != null ? int.tryParse(json['recordStartTime'].toString()) : null,
|
|
detectionDistance: json['detectionDistance'],
|
|
);
|
|
}
|
|
|
|
int? recordMode;
|
|
String? recordTime;
|
|
int? realTimeMode;
|
|
int? recordEndTime;
|
|
int? recordStartTime;
|
|
String? detectionDistance;
|
|
|
|
// 将对象转换为 JSON 数据
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
data['recordMode'] = recordMode;
|
|
data['recordTime'] = recordTime;
|
|
data['realTimeMode'] = realTimeMode;
|
|
data['recordEndTime'] = recordEndTime;
|
|
data['recordStartTime'] = recordStartTime;
|
|
data['detectionDistance'] = detectionDistance;
|
|
return data;
|
|
}
|
|
}
|