26 lines
591 B
Dart
26 lines
591 B
Dart
class Section {
|
|
final String id;
|
|
final String name;
|
|
final String description;
|
|
final String thumbnail;
|
|
final DateTime timeSection;
|
|
|
|
Section({
|
|
required this.id,
|
|
required this.name,
|
|
required this.description,
|
|
required this.thumbnail,
|
|
required this.timeSection,
|
|
});
|
|
|
|
factory Section.fromJson(Map<String, dynamic> json) {
|
|
return Section(
|
|
id: json['ID_SECTION'],
|
|
name: json['NAME_SECTION'],
|
|
description: json['DESCRIPTION_SECTION'],
|
|
thumbnail: json['THUMBNAIL'],
|
|
timeSection: DateTime.parse(json['TIME_SECTION']),
|
|
);
|
|
}
|
|
}
|