2024-08-22 12:28:24 +01:00
|
|
|
class Favorite {
|
|
|
|
int id;
|
|
|
|
String userId;
|
|
|
|
double lat;
|
|
|
|
double lng;
|
|
|
|
|
|
|
|
Favorite(this.id, this.userId, this.lat, this.lng);
|
|
|
|
}
|
|
|
|
|
2024-08-23 11:34:38 +01:00
|
|
|
class User {
|
2024-08-22 12:28:24 +01:00
|
|
|
String token;
|
2024-08-23 11:34:38 +01:00
|
|
|
String id;
|
|
|
|
String email;
|
|
|
|
String username;
|
|
|
|
DateTime createdAt;
|
|
|
|
|
|
|
|
User(this.token, this.id, this.email, this.username, this.createdAt);
|
|
|
|
|
|
|
|
factory User.fromJson(Map<String, dynamic> json) {
|
|
|
|
return User(
|
|
|
|
json['token'],
|
|
|
|
json['id'],
|
|
|
|
json['email'],
|
|
|
|
json['username'],
|
|
|
|
DateTime.parse(json['createdAt']),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
2024-08-22 12:28:24 +01:00
|
|
|
|