mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
visitor password
This commit is contained in:
@ -1,37 +0,0 @@
|
||||
class AccessManagModel {
|
||||
final String accessUser;
|
||||
final String accessType;
|
||||
final String accessPeriod;
|
||||
final String accessibleDevice;
|
||||
final String authorizationSource;
|
||||
final String authorizer;
|
||||
final String authorizationTime;
|
||||
final String accessStatus;
|
||||
final String actions;
|
||||
|
||||
AccessManagModel({
|
||||
required this.accessUser,
|
||||
required this.accessType,
|
||||
required this.accessPeriod,
|
||||
required this.accessibleDevice,
|
||||
required this.authorizationSource,
|
||||
required this.authorizer,
|
||||
required this.authorizationTime,
|
||||
required this.accessStatus,
|
||||
required this.actions,
|
||||
});
|
||||
|
||||
factory AccessManagModel.fromJson(Map<String, dynamic> json) {
|
||||
return AccessManagModel(
|
||||
accessUser: json['accessUser'],
|
||||
accessType: json['accessType'],
|
||||
accessPeriod: json['accessPeriod'],
|
||||
accessibleDevice: json['accessibleDevice'],
|
||||
authorizationSource: json['authorizationSource'],
|
||||
authorizer: json['authorizer'],
|
||||
authorizationTime: json['authorizationTime'],
|
||||
accessStatus: json['accessStatus'],
|
||||
actions: json['actions'],
|
||||
);
|
||||
}
|
||||
}
|
54
lib/pages/access_management/model/password_model.dart
Normal file
54
lib/pages/access_management/model/password_model.dart
Normal file
@ -0,0 +1,54 @@
|
||||
class PasswordModel {
|
||||
final dynamic passwordId;
|
||||
final dynamic invalidTime;
|
||||
final dynamic effectiveTime;
|
||||
final dynamic passwordCreated;
|
||||
final dynamic createdTime;
|
||||
final dynamic passwodName; // New field
|
||||
final dynamic passwordStatus;
|
||||
final dynamic passwordType;
|
||||
final dynamic deviceUuid;
|
||||
|
||||
PasswordModel({
|
||||
this.passwordId,
|
||||
this.invalidTime,
|
||||
this.effectiveTime,
|
||||
this.passwordCreated,
|
||||
this.createdTime,
|
||||
this.passwodName, // New field
|
||||
this.passwordStatus,
|
||||
this.passwordType,
|
||||
this.deviceUuid,
|
||||
});
|
||||
|
||||
factory PasswordModel.fromJson(Map<String, dynamic> json) {
|
||||
return PasswordModel(
|
||||
passwordId: json['passwordId'],
|
||||
invalidTime: json['invalidTime'],
|
||||
effectiveTime: json['effectiveTime'],
|
||||
passwordCreated: json['passwordCreated'],
|
||||
createdTime: json['createdTime'],
|
||||
passwodName: json['passwodName']??'No name', // New field
|
||||
passwordStatus: json['passwordStatus'],
|
||||
passwordType: json['passwordType'],
|
||||
deviceUuid: json['deviceUuid'],
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
return {
|
||||
'passwordId': passwordId,
|
||||
'invalidTime': invalidTime,
|
||||
'effectiveTime': effectiveTime,
|
||||
'passwordCreated': passwordCreated,
|
||||
'createdTime': createdTime,
|
||||
'passwodName': passwodName, // New field
|
||||
'passwordStatus': passwordStatus,
|
||||
'passwordType': passwordType,
|
||||
'deviceUuid': deviceUuid,
|
||||
};
|
||||
}
|
||||
List<PasswordModel> parsePasswordList(List<dynamic> jsonList) {
|
||||
return jsonList.map((json) => PasswordModel.fromJson(json)).toList();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user