forked from eatvio/eatvio_app
22 lines
660 B
Dart
22 lines
660 B
Dart
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);
|
|
}
|