feat(diary): New models for calendar and autocomplete fix

This commit is contained in:
2024-07-19 11:55:48 +03:00
parent dbe8ac0999
commit be461e4183
13 changed files with 1140 additions and 444 deletions

View File

@@ -0,0 +1,21 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'calendar_model.freezed.dart';
part 'calendar_model.g.dart';
@freezed
class CalendarModel with _$CalendarModel {
const factory CalendarModel({
required int id,
required String state,
required String image,
required String description,
@JsonKey(name: "youtube_url") required String youtubeUrl,
@JsonKey(name: "created_at") required DateTime createdAt,
@JsonKey(name: "updated_at") required DateTime updatedAt,
required String title,
}) = _CalendarModel;
factory CalendarModel.fromJson(Map<String, Object?> json) =>
_$CalendarModelFromJson(json);
}