69 lines
1.7 KiB
Dart
69 lines
1.7 KiB
Dart
class Film {
|
|
final int id;
|
|
final String title;
|
|
final String genre;
|
|
final double rating;
|
|
final String description;
|
|
final int duration;
|
|
final String ageRating;
|
|
final String director;
|
|
final List<String> cast;
|
|
final DateTime releaseDate;
|
|
final DateTime endDate;
|
|
final Map<String, Map<String, Map<String, List<List<String>>>>>
|
|
schedules; // cinema -> date -> time -> seats
|
|
final int price;
|
|
final String? imageUrl;
|
|
|
|
Film({
|
|
required this.id,
|
|
required this.title,
|
|
required this.genre,
|
|
required this.rating,
|
|
required this.description,
|
|
required this.duration,
|
|
required this.ageRating,
|
|
required this.director,
|
|
required this.cast,
|
|
required this.releaseDate,
|
|
required this.endDate,
|
|
required this.schedules,
|
|
required this.price,
|
|
this.imageUrl,
|
|
});
|
|
|
|
Film copyWith({
|
|
int? id,
|
|
String? title,
|
|
String? genre,
|
|
double? rating,
|
|
String? description,
|
|
int? duration,
|
|
String? ageRating,
|
|
String? director,
|
|
List<String>? cast,
|
|
DateTime? releaseDate,
|
|
DateTime? endDate,
|
|
Map<String, Map<String, Map<String, List<List<String>>>>>? schedules,
|
|
int? price,
|
|
String? imageUrl,
|
|
}) {
|
|
return Film(
|
|
id: id ?? this.id,
|
|
title: title ?? this.title,
|
|
genre: genre ?? this.genre,
|
|
rating: rating ?? this.rating,
|
|
description: description ?? this.description,
|
|
duration: duration ?? this.duration,
|
|
ageRating: ageRating ?? this.ageRating,
|
|
director: director ?? this.director,
|
|
cast: cast ?? this.cast,
|
|
releaseDate: releaseDate ?? this.releaseDate,
|
|
endDate: endDate ?? this.endDate,
|
|
schedules: schedules ?? this.schedules,
|
|
price: price ?? this.price,
|
|
imageUrl: imageUrl ?? this.imageUrl,
|
|
);
|
|
}
|
|
}
|