diff --git a/creche_app/lib/models/profile.dart b/creche_app/lib/models/profile.dart deleted file mode 100644 index d8c11c4..0000000 --- a/creche_app/lib/models/profile.dart +++ /dev/null @@ -1,46 +0,0 @@ -class Profile { - final String id; - final String userId; - final String fullName; - final String? avatarUrl; - final String? phone; - final String role; - final String? position; - final DateTime createdAt; - - Profile({ - required this.id, - required this.userId, - required this.fullName, - this.avatarUrl, - this.phone, - required this.role, - this.position, - required this.createdAt, - }); - - factory Profile.fromMap(Map map) { - return Profile( - id: map['id'] ?? '', - userId: map['user_id'] ?? '', - fullName: map['full_name'] ?? '', - avatarUrl: map['avatar_url'], - phone: map['phone'], - role: map['role'] ?? 'parent', - position: map['position'], - createdAt: DateTime.tryParse(map['created_at'] ?? '') ?? DateTime.now(), - ); - } - - Map toMap() { - return { - 'id': id, - 'user_id': userId, - 'full_name': fullName, - 'avatar_url': avatarUrl, - 'phone': phone, - 'role': role, - 'position': position, - }; - } -}