You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
355 B
21 lines
355 B
|
10 months ago
|
class Role {
|
||
|
|
final int? id;
|
||
|
|
final String designation;
|
||
|
|
|
||
|
|
Role({this.id, required this.designation});
|
||
|
|
|
||
|
|
Map<String, dynamic> toMap() {
|
||
|
|
return {
|
||
|
|
'id': id,
|
||
|
|
'designation': designation,
|
||
|
|
};
|
||
|
|
}
|
||
|
|
|
||
|
|
factory Role.fromMap(Map<String, dynamic> map) {
|
||
|
|
return Role(
|
||
|
|
id: map['id'],
|
||
|
|
designation: map['designation'],
|
||
|
|
);
|
||
|
|
}
|
||
|
|
}
|