Eliminar creche_app/lib/models/class_model.dart
This commit is contained in:
parent
c3d9619d4c
commit
7536993c3d
|
|
@ -1,30 +0,0 @@
|
|||
class ClassModel {
|
||||
final String id;
|
||||
final String name;
|
||||
final int capacity;
|
||||
final String? teacherId;
|
||||
|
||||
ClassModel({
|
||||
required this.id,
|
||||
required this.name,
|
||||
required this.capacity,
|
||||
this.teacherId,
|
||||
});
|
||||
|
||||
factory ClassModel.fromMap(Map<String, dynamic> map) {
|
||||
return ClassModel(
|
||||
id: map['id'] ?? '',
|
||||
name: map['name'] ?? '',
|
||||
capacity: map['capacity'] ?? 15,
|
||||
teacherId: map['teacher_id'],
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toMap() {
|
||||
return {
|
||||
'name': name,
|
||||
'capacity': capacity,
|
||||
'teacher_id': teacherId,
|
||||
};
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue