23 lines
421 B
Dart
23 lines
421 B
Dart
class Album {
|
|
final int id;
|
|
final String name;
|
|
final DateTime createdAt;
|
|
final DateTime updatedAt;
|
|
|
|
Album({
|
|
required this.id,
|
|
required this.name,
|
|
required this.createdAt,
|
|
required this.updatedAt,
|
|
});
|
|
|
|
Map<String, dynamic> toJson() {
|
|
return {
|
|
'id': id,
|
|
'name': name,
|
|
'createdAt': createdAt.toIso8601String(),
|
|
'updatedAt': updatedAt.toIso8601String(),
|
|
};
|
|
}
|
|
}
|