mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-09 14:47:23 +00:00
51 lines
1.4 KiB
Dart
51 lines
1.4 KiB
Dart
class RolesUserModel {
|
|
final String uuid;
|
|
final DateTime createdAt;
|
|
final String email;
|
|
final dynamic firstName;
|
|
final dynamic lastName;
|
|
final dynamic roleType;
|
|
final dynamic status;
|
|
final bool isEnabled;
|
|
final String invitedBy;
|
|
final dynamic phoneNumber;
|
|
final dynamic jobTitle;
|
|
final dynamic createdDate;
|
|
final dynamic createdTime;
|
|
|
|
RolesUserModel({
|
|
required this.uuid,
|
|
required this.createdAt,
|
|
required this.email,
|
|
required this.firstName,
|
|
required this.lastName,
|
|
required this.roleType,
|
|
required this.status,
|
|
required this.isEnabled,
|
|
required this.invitedBy,
|
|
this.phoneNumber,
|
|
this.jobTitle,
|
|
required this.createdDate,
|
|
required this.createdTime,
|
|
});
|
|
|
|
factory RolesUserModel.fromJson(Map<String, dynamic> json) {
|
|
return RolesUserModel(
|
|
uuid: json['uuid'],
|
|
createdAt: DateTime.parse(json['createdAt']),
|
|
email: json['email'],
|
|
firstName: json['firstName'],
|
|
lastName: json['lastName'],
|
|
roleType: json['roleType'].toString().toLowerCase().replaceAll("_", " "),
|
|
status: json['status'],
|
|
isEnabled: json['isEnabled'],
|
|
invitedBy:
|
|
json['invitedBy'].toString().toLowerCase().replaceAll("_", " "),
|
|
phoneNumber: json['phoneNumber'],
|
|
jobTitle: json['jobTitle'].toString(),
|
|
createdDate: json['createdDate'],
|
|
createdTime: json['createdTime'],
|
|
);
|
|
}
|
|
}
|