373 lines
11 KiB
Dart
Executable File
373 lines
11 KiB
Dart
Executable File
class LockUserEntity {
|
|
LockUserEntity({this.errorCode, this.description, this.errorMsg, this.data});
|
|
|
|
LockUserEntity.fromJson(Map<String, dynamic> json) {
|
|
errorCode = json['errorCode'];
|
|
description = json['description'];
|
|
errorMsg = json['errorMsg'];
|
|
if (json['data'] != null) {
|
|
data = <LockUserData>[];
|
|
json['data'].forEach((v) {
|
|
data!.add(LockUserData.fromJson(v));
|
|
});
|
|
}
|
|
}
|
|
int? errorCode;
|
|
String? description;
|
|
String? errorMsg;
|
|
List<LockUserData>? 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!.map((v) => v.toJson()).toList();
|
|
}
|
|
return data;
|
|
}
|
|
}
|
|
|
|
class LockUserData {
|
|
LockUserData({this.openLockType, this.openLockTypeName, this.lockUserList});
|
|
|
|
LockUserData.fromJson(Map<String, dynamic> json) {
|
|
openLockType = json['openLockType'];
|
|
openLockTypeName = json['openLockTypeName'];
|
|
if (json['keys'] != null) {
|
|
lockUserList = <LockUserListKeys>[];
|
|
json['keys'].forEach((v) {
|
|
lockUserList!.add(LockUserListKeys.fromJson(v));
|
|
});
|
|
}
|
|
}
|
|
int? openLockType;
|
|
String? openLockTypeName;
|
|
List<LockUserListKeys>? lockUserList;
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
data['openLockType'] = openLockType;
|
|
data['openLockTypeName'] = openLockTypeName;
|
|
if (lockUserList != null) {
|
|
data['keys'] = lockUserList!.map((v) => v.toJson()).toList();
|
|
}
|
|
return data;
|
|
}
|
|
}
|
|
|
|
class LockUserListKeys {
|
|
//当前开门ID
|
|
|
|
LockUserListKeys(
|
|
{this.id,
|
|
this.clientId,
|
|
this.lockOwnerId,
|
|
this.apiUserId,
|
|
this.lockId,
|
|
// this.senderUserId,
|
|
// this.receiverUsernameType,
|
|
this.keyName,
|
|
this.keyType,
|
|
this.startDate,
|
|
this.endDate,
|
|
this.weekDays,
|
|
this.remarks,
|
|
this.remoteEnable,
|
|
this.isCameraEnable,
|
|
this.faceAuthentication,
|
|
this.lastFaceValidateTime,
|
|
this.keyRight,
|
|
this.remoteUnlockSwitch,
|
|
this.userType,
|
|
this.keyStatus,
|
|
this.groupId,
|
|
this.lockUserNo,
|
|
this.businessId,
|
|
this.createdAt,
|
|
this.updatedAt,
|
|
this.isOnlyManageSelf,
|
|
this.userInfo,
|
|
this.userSender,
|
|
this.keyboardPwdType,
|
|
this.fingerprintType,
|
|
this.cardType,
|
|
this.faceType,
|
|
this.keyboardPwdStatus,
|
|
this.keyboardPwdName,
|
|
this.fingerprintName,
|
|
this.cardName,
|
|
this.faceName,
|
|
this.faceId,
|
|
this.keyboardPwd,
|
|
this.keyboardPwdHash,
|
|
this.addType,
|
|
this.pwdRight,
|
|
this.isCustom,
|
|
this.isCoerced,
|
|
this.hoursStart,
|
|
this.hoursEnd,
|
|
this.pwdUserNo,
|
|
this.senderUsername,
|
|
this.keyboardPwdId,
|
|
this.sendDate,
|
|
this.currentKeyType,
|
|
this.currentTypeImg,
|
|
this.currentKeyName,
|
|
this.isCurrentSelect,
|
|
this.fingerprintId,
|
|
this.cardId,
|
|
this.currentDateType});
|
|
|
|
LockUserListKeys.fromJson(Map<String, dynamic> json) {
|
|
if (json['id'] != null) {
|
|
id = json['id'];
|
|
}
|
|
clientId = json['clientId'];
|
|
lockOwnerId = json['lockOwnerId'];
|
|
apiUserId = json['apiUserId'];
|
|
lockId = json['lockId'];
|
|
// senderUserId = json['senderUserId'];
|
|
// receiverUsernameType = json['receiverUsernameType'];
|
|
keyName = json['keyName'];
|
|
keyType = json['keyType'];
|
|
startDate = json['startDate'];
|
|
endDate = json['endDate'];
|
|
if (json['weekDays'] != null) {
|
|
weekDays = [];
|
|
json['weekDays'].forEach((v) {
|
|
weekDays!.add(v);
|
|
});
|
|
}
|
|
remarks = json['remarks'];
|
|
remoteEnable = json['remoteEnable'];
|
|
isCameraEnable = json['isCameraEnable'];
|
|
faceAuthentication = json['faceAuthentication'];
|
|
lastFaceValidateTime = json['lastFaceValidateTime'];
|
|
keyRight = json['keyRight'];
|
|
remoteUnlockSwitch = json['remoteUnlockSwitch'];
|
|
userType = json['userType'];
|
|
keyStatus = json['keyStatus'];
|
|
groupId = json['groupId'];
|
|
lockUserNo = json['lockUserNo'];
|
|
businessId = json['businessId'];
|
|
createdAt = json['created_at'];
|
|
updatedAt = json['updated_at'];
|
|
isOnlyManageSelf = json['isOnlyManageSelf'];
|
|
userInfo =
|
|
json['user_info'] != null ? UserInfo.fromJson(json['user_info']) : null;
|
|
userSender = json['user_sender'] != null
|
|
? UserInfo.fromJson(json['user_sender'])
|
|
: null;
|
|
keyboardPwdType = json['keyboardPwdType'];
|
|
fingerprintType = json['fingerprintType'];
|
|
cardType = json['cardType'];
|
|
faceType = json['faceType'];
|
|
faceId = json['faceId'];
|
|
keyboardPwdStatus = json['keyboardPwdStatus'];
|
|
keyboardPwdName = json['keyboardPwdName'];
|
|
fingerprintName = json['fingerprintName'];
|
|
cardName = json['cardName'];
|
|
faceName = json['faceName'];
|
|
keyboardPwd = json['keyboardPwd'];
|
|
keyboardPwdHash = json['keyboardPwdHash'];
|
|
addType = json['addType'];
|
|
pwdRight = json['pwdRight'];
|
|
isCustom = json['isCustom'];
|
|
isCoerced = json['isCoerced'];
|
|
hoursStart = json['hoursStart'];
|
|
hoursEnd = json['hoursEnd'];
|
|
pwdUserNo = json['pwdUserNo'];
|
|
senderUsername = json['senderUsername'];
|
|
keyboardPwdId = json['keyboardPwdId'];
|
|
sendDate = json['sendDate'];
|
|
currentKeyType = json['currentKeyType'];
|
|
currentTypeImg = json['currentTypeImg'];
|
|
currentKeyName = json['currentKeyName'];
|
|
isCurrentSelect = json['isCurrentSelect'];
|
|
fingerprintId = json['fingerprintId'];
|
|
cardId = json['cardId'];
|
|
currentDateType = json['currentDateType'];
|
|
}
|
|
int? id;
|
|
String? clientId;
|
|
int? lockOwnerId;
|
|
int? apiUserId;
|
|
int? lockId;
|
|
// int? senderUserId;
|
|
// int? receiverUsernameType;
|
|
String? keyName;
|
|
int? keyType;
|
|
int? startDate;
|
|
int? endDate;
|
|
List? weekDays;
|
|
String? remarks;
|
|
int? remoteEnable;
|
|
int? isCameraEnable;
|
|
int? faceAuthentication;
|
|
int? lastFaceValidateTime;
|
|
int? keyRight;
|
|
int? remoteUnlockSwitch;
|
|
int? userType;
|
|
int? keyStatus;
|
|
int? groupId;
|
|
int? lockUserNo;
|
|
int? businessId;
|
|
String? createdAt;
|
|
String? updatedAt;
|
|
int? isOnlyManageSelf;
|
|
UserInfo? userInfo;
|
|
UserInfo? userSender;
|
|
int? keyboardPwdType;
|
|
int? fingerprintType;
|
|
int? cardType;
|
|
int? faceType;
|
|
int? faceId;
|
|
int? keyboardPwdStatus;
|
|
String? keyboardPwdName;
|
|
String? fingerprintName;
|
|
String? cardName;
|
|
String? faceName;
|
|
String? keyboardPwd;
|
|
String? keyboardPwdHash;
|
|
int? addType;
|
|
int? pwdRight;
|
|
int? isCustom;
|
|
int? isCoerced;
|
|
int? hoursStart;
|
|
int? hoursEnd;
|
|
int? pwdUserNo;
|
|
String? senderUsername;
|
|
int? keyboardPwdId;
|
|
int? sendDate;
|
|
int? fingerprintId;
|
|
int? cardId;
|
|
int? currentKeyType; //当前钥匙类型 1:电子钥匙 2:密码钥匙 3:指纹钥匙 4:卡钥匙 5:人脸钥匙
|
|
String? currentKeyTypeStr; //当前钥匙类型名称
|
|
String? currentTypeImg; //当前钥匙类型图片
|
|
String? currentKeyName; //当前钥匙名称
|
|
bool? isCurrentSelect; //当前是否选中
|
|
int? currentDateType; //钥匙日期类型 1:永久 2:限期 3:单次 4:循环
|
|
int? currentOpenDoorID;
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
if (id != null) {
|
|
data['id'] = id;
|
|
}
|
|
data['clientId'] = clientId;
|
|
data['lockOwnerId'] = lockOwnerId;
|
|
data['apiUserId'] = apiUserId;
|
|
data['lockId'] = lockId;
|
|
// data['senderUserId'] = senderUserId;
|
|
// data['receiverUsernameType'] = receiverUsernameType;
|
|
data['keyName'] = keyName;
|
|
data['keyType'] = keyType;
|
|
data['startDate'] = startDate;
|
|
data['endDate'] = endDate;
|
|
if (weekDays != null) {
|
|
data['weekDays'] = weekDays!.map((v) => v).toList();
|
|
}
|
|
data['remarks'] = remarks;
|
|
data['remoteEnable'] = remoteEnable;
|
|
data['isCameraEnable'] = isCameraEnable;
|
|
data['faceAuthentication'] = faceAuthentication;
|
|
data['lastFaceValidateTime'] = lastFaceValidateTime;
|
|
data['keyRight'] = keyRight;
|
|
data['remoteUnlockSwitch'] = remoteUnlockSwitch;
|
|
data['userType'] = userType;
|
|
data['keyStatus'] = keyStatus;
|
|
data['groupId'] = groupId;
|
|
data['lockUserNo'] = lockUserNo;
|
|
data['businessId'] = businessId;
|
|
data['created_at'] = createdAt;
|
|
data['updated_at'] = updatedAt;
|
|
data['isOnlyManageSelf'] = isOnlyManageSelf;
|
|
if (userInfo != null) {
|
|
data['user_info'] = userInfo!.toJson();
|
|
}
|
|
if (userSender != null) {
|
|
data['user_sender'] = userSender!.toJson();
|
|
}
|
|
data['keyboardPwdType'] = keyboardPwdType;
|
|
data['fingerprintType'] = fingerprintType;
|
|
data['cardType'] = cardType;
|
|
data['faceType'] = faceType;
|
|
data['faceId'] = faceId;
|
|
data['keyboardPwdStatus'] = keyboardPwdStatus;
|
|
data['keyboardPwdName'] = keyboardPwdName;
|
|
data['fingerprintName'] = fingerprintName;
|
|
data['cardName'] = cardName;
|
|
data['faceName'] = faceName;
|
|
data['keyboardPwd'] = keyboardPwd;
|
|
data['keyboardPwdHash'] = keyboardPwdHash;
|
|
data['addType'] = addType;
|
|
data['pwdRight'] = pwdRight;
|
|
data['isCustom'] = isCustom;
|
|
data['isCoerced'] = isCoerced;
|
|
data['hoursStart'] = hoursStart;
|
|
data['hoursEnd'] = hoursEnd;
|
|
data['pwdUserNo'] = pwdUserNo;
|
|
data['senderUsername'] = senderUsername;
|
|
data['keyboardPwdId'] = keyboardPwdId;
|
|
data['cardId'] = cardId;
|
|
data['sendDate'] = sendDate;
|
|
data['currentKeyType'] = currentKeyType;
|
|
data['currentTypeImg'] = currentTypeImg;
|
|
data['currentKeyName'] = currentKeyName;
|
|
data['isCurrentSelect'] = isCurrentSelect;
|
|
data['currentDateType'] = currentDateType;
|
|
|
|
return data;
|
|
}
|
|
}
|
|
|
|
class UserInfo {
|
|
UserInfo(
|
|
{this.id,
|
|
this.clientId,
|
|
this.username,
|
|
this.accountName,
|
|
this.businessQueryStr,
|
|
this.password,
|
|
this.date,
|
|
this.createdAt,
|
|
this.updatedAt});
|
|
|
|
UserInfo.fromJson(Map<String, dynamic> json) {
|
|
id = json['id'];
|
|
clientId = json['client_id'];
|
|
username = json['username'];
|
|
accountName = json['account_name'];
|
|
businessQueryStr = json['businessQueryStr'];
|
|
password = json['password'];
|
|
date = json['date'];
|
|
createdAt = json['created_at'];
|
|
updatedAt = json['updated_at'];
|
|
}
|
|
int? id;
|
|
String? clientId;
|
|
String? username;
|
|
String? accountName;
|
|
String? businessQueryStr;
|
|
String? password;
|
|
int? date;
|
|
String? createdAt;
|
|
String? updatedAt;
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
data['id'] = id;
|
|
data['client_id'] = clientId;
|
|
data['username'] = username;
|
|
data['account_name'] = accountName;
|
|
data['businessQueryStr'] = businessQueryStr;
|
|
data['password'] = password;
|
|
data['date'] = date;
|
|
data['created_at'] = createdAt;
|
|
data['updated_at'] = updatedAt;
|
|
return data;
|
|
}
|
|
}
|