passo_mobile_app/lib/model/rbac/user.dart

35 lines
859 B
Dart
Raw Permalink Normal View History

class User {
final int id;
final String? username;
final String? firstName;
final String? lastName;
final String? email;
final bool? isActive;
User({
required this.id,
required this.username,
required this.firstName,
required this.lastName,
required this.email,
required this.isActive,
});
factory User.fromJson(Map<String, dynamic> json) => User(
id: json["id"],
username: json["username"],
firstName: json["first_name"],
lastName: json["last_name"],
email: json["email"],
isActive: json["is_active"],
);
Map<String, dynamic> toJson() => {
"id": id,
"username": username,
"first_name": firstName,
"last_name": lastName,
"email": email,
"is_active": isActive,
};
}