class KeyListByUserEntity { KeyListByUserEntity( {this.errorCode, this.description, this.errorMsg, this.data}); KeyListByUserEntity.fromJson(Map json) { errorCode = json['errorCode']; description = json['description']; errorMsg = json['errorMsg']; data = json['data'] != null ? KeyListByUserData.fromJson(json['data']) : null; } int? errorCode; String? description; String? errorMsg; KeyListByUserData? 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 KeyListByUserData { KeyListByUserData( {this.keyList, this.pageNo, this.pageSize, this.pages, this.total}); KeyListByUserData.fromJson(Map json) { if (json['list'] != null) { keyList = []; json['list'].forEach((v) { keyList!.add(KeyListItem.fromJson(v)); }); } pageNo = json['pageNo']; pageSize = json['pageSize']; pages = json['pages']; total = json['total']; } List? keyList; int? pageNo; int? pageSize; int? pages; int? total; Map toJson() { final Map data = {}; if (keyList != null) { data['list'] = keyList!.map((v) => v.toJson()).toList(); } data['pageNo'] = pageNo; data['pageSize'] = pageSize; data['pages'] = pages; data['total'] = total; return data; } } class KeyListItem { KeyListItem( {this.clientId, this.lockOwnerId, this.lockId, this.senderUserId, this.keyName, this.keyType, this.startDate, this.endDate, this.weekDays, this.remarks, this.remoteEnable, this.isCameraEnable, this.faceAuthentication, this.keyRight, this.userType, this.keyStatus, this.groupId, this.lockUserNo, this.date, this.createdAt, this.updatedAt, this.userInfo, this.keyId, this.uid, this.lockAlias}); KeyListItem.fromJson(Map json) { clientId = json['clientId']; lockOwnerId = json['lockOwnerId']; lockId = json['lockId']; senderUserId = json['senderUserId']; 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']; keyRight = json['keyRight']; userType = json['userType']; keyStatus = json['keyStatus']; groupId = json['groupId']; lockUserNo = json['lockUserNo']; date = json['date']; createdAt = json['created_at']; updatedAt = json['updated_at']; userInfo = json['user_info'] != null ? UserInfo.fromJson(json['user_info']) : null; keyId = json['keyId']; uid = json['uid']; lockAlias = json['lockAlias']; } String? clientId; int? lockOwnerId; int? lockId; int? senderUserId; String? keyName; int? keyType; int? startDate; int? endDate; List? weekDays; String? remarks; int? remoteEnable; int? isCameraEnable; int? faceAuthentication; int? keyRight; int? userType; int? keyStatus; int? groupId; int? lockUserNo; int? date; String? createdAt; String? updatedAt; UserInfo? userInfo; int? keyId; int? uid; String? lockAlias; Map toJson() { final Map data = {}; data['clientId'] = clientId; data['lockOwnerId'] = lockOwnerId; data['lockId'] = lockId; data['senderUserId'] = senderUserId; data['keyName'] = keyName; data['keyType'] = keyType; data['startDate'] = startDate; data['endDate'] = endDate; if (weekDays != null) { data['weekDays'] = weekDays!.map((v) => v.toJson()).toList(); } data['remarks'] = remarks; data['remoteEnable'] = remoteEnable; data['isCameraEnable'] = isCameraEnable; data['faceAuthentication'] = faceAuthentication; data['keyRight'] = keyRight; data['userType'] = userType; data['keyStatus'] = keyStatus; data['groupId'] = groupId; data['lockUserNo'] = lockUserNo; data['date'] = date; data['created_at'] = createdAt; data['updated_at'] = updatedAt; if (userInfo != null) { data['user_info'] = userInfo!.toJson(); } data['keyId'] = keyId; data['uid'] = uid; data['lockAlias'] = lockAlias; return data; } } class UserInfo { UserInfo({this.id, this.accountName}); UserInfo.fromJson(Map json) { id = json['id']; accountName = json['account_name']; } int? id; String? accountName; Map toJson() { final Map data = {}; data['id'] = id; data['account_name'] = accountName; return data; } }