This commit is contained in:
2026-05-14 16:54:32 +00:00
parent 5b2a2e7ddb
commit 15fcbcc9eb
212 changed files with 18586 additions and 10360 deletions
@@ -1,29 +1,29 @@
class EmotionEntry {
final int? id;
final String emotion; // ex: 'Heureux', 'Triste', 'Stressé'
final String? note;
final DateTime createdAt;
EmotionEntry({
this.id,
required this.emotion,
this.note,
required this.createdAt,
});
factory EmotionEntry.fromJson(Map<String, dynamic> json) {
return EmotionEntry(
id: json['id'],
emotion: json['emotion_name'] ?? json['emotion'] ?? '',
note: json['note'],
createdAt: DateTime.parse(json['created_at']),
);
}
Map<String, dynamic> toJson() {
return {
'emotion_name': emotion,
'note': note,
};
}
}
class EmotionEntry {
final int? id;
final String emotion; // ex: 'Heureux', 'Triste', 'Stressé'
final String? note;
final DateTime createdAt;
EmotionEntry({
this.id,
required this.emotion,
this.note,
required this.createdAt,
});
factory EmotionEntry.fromJson(Map<String, dynamic> json) {
return EmotionEntry(
id: json['id'],
emotion: json['emotion_name'] ?? json['emotion'] ?? '',
note: json['note'],
createdAt: DateTime.parse(json['created_at']),
);
}
Map<String, dynamic> toJson() {
return {
'emotion_name': emotion,
'note': note,
};
}
}