mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-11-27 21:34:54 +00:00
door lock password update
This commit is contained in:
63
lib/features/devices/model/offline_password_model.dart
Normal file
63
lib/features/devices/model/offline_password_model.dart
Normal file
@ -0,0 +1,63 @@
|
||||
|
||||
|
||||
class OfflinePasswordModel {
|
||||
final dynamic gmtCreate;
|
||||
final dynamic gmtExpired;
|
||||
final dynamic gmtStart;
|
||||
final bool hasClearPwd;
|
||||
final String optUid;
|
||||
final String pwd;
|
||||
final dynamic pwdId;
|
||||
final String pwdName;
|
||||
final String pwdTypeCode;
|
||||
final String revokedPwdName;
|
||||
final dynamic status;
|
||||
|
||||
OfflinePasswordModel({
|
||||
required this.gmtCreate,
|
||||
required this.gmtExpired,
|
||||
required this.gmtStart,
|
||||
required this.hasClearPwd,
|
||||
required this.optUid,
|
||||
required this.pwd,
|
||||
required this.pwdId,
|
||||
required this.pwdName,
|
||||
required this.pwdTypeCode,
|
||||
required this.revokedPwdName,
|
||||
required this.status,
|
||||
});
|
||||
|
||||
// Factory method to create a Password from a JSON map
|
||||
factory OfflinePasswordModel.fromJson(Map<String, dynamic> json) {
|
||||
return OfflinePasswordModel(
|
||||
gmtCreate: json['gmtCreate'],
|
||||
gmtExpired: json['gmtExpired'],
|
||||
gmtStart: json['gmtStart'],
|
||||
hasClearPwd: json['hasClearPwd'],
|
||||
optUid: json['optUid'],
|
||||
pwd: json['pwd'],
|
||||
pwdId: json['pwdId'],
|
||||
pwdName: json['pwdName'],
|
||||
pwdTypeCode: json['pwdTypeCode'],
|
||||
revokedPwdName: json['revokedPwdName'],
|
||||
status: json['status'],
|
||||
);
|
||||
}
|
||||
|
||||
// Method to convert a Password object to a JSON map
|
||||
Map<String, dynamic> toJson() {
|
||||
return {
|
||||
'gmtCreate': gmtCreate,
|
||||
'gmtExpired': gmtExpired,
|
||||
'gmtStart': gmtStart,
|
||||
'hasClearPwd': hasClearPwd,
|
||||
'optUid': optUid,
|
||||
'pwd': pwd,
|
||||
'pwdId': pwdId,
|
||||
'pwdName': pwdName,
|
||||
'pwdTypeCode': pwdTypeCode,
|
||||
'revokedPwdName': revokedPwdName,
|
||||
'status': status,
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user