mobile_adaptive_learning/lib/features/learning/modules/model/section_model.dart

26 lines
583 B
Dart
Raw Normal View History

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,
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']),
);
}
}