26 lines
504 B
Dart
26 lines
504 B
Dart
class UserProfile {
|
|
final String id;
|
|
final String role;
|
|
final String? fullName;
|
|
|
|
UserProfile({
|
|
required this.id,
|
|
required this.role,
|
|
this.fullName,
|
|
});
|
|
|
|
factory UserProfile.fromJson(Map<String, dynamic> json) {
|
|
return UserProfile(
|
|
id: json['id'] as String,
|
|
role: json['role'] as String,
|
|
fullName: json['full_name'] as String?,
|
|
);
|
|
}
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
'id': id,
|
|
'role': role,
|
|
'full_name': fullName,
|
|
};
|
|
}
|