Update Saqel Platform: 2026-09-10 12:26:22
This commit is contained in:
@@ -255,19 +255,25 @@ class CurriculumLessonItemModel {
|
||||
/// Model representing a Resource Item (PDF Textbook or Worksheet)
|
||||
class ResourceItemModel {
|
||||
final String title;
|
||||
final String filePath;
|
||||
final String assetId;
|
||||
final String assetType;
|
||||
final String mimeType;
|
||||
final String type; // textbook, worksheet, summary
|
||||
|
||||
const ResourceItemModel({
|
||||
required this.title,
|
||||
required this.filePath,
|
||||
required this.assetId,
|
||||
required this.assetType,
|
||||
required this.mimeType,
|
||||
this.type = 'textbook',
|
||||
});
|
||||
|
||||
factory ResourceItemModel.fromJson(Map<String, dynamic> json) {
|
||||
return ResourceItemModel(
|
||||
title: json['title']?.toString() ?? 'ملف وزاري',
|
||||
filePath: json['file']?.toString() ?? '',
|
||||
assetId: json['asset_id']?.toString() ?? '',
|
||||
assetType: json['asset_type']?.toString() ?? 'other',
|
||||
mimeType: json['mime_type']?.toString() ?? '',
|
||||
type: json['type']?.toString() ?? 'textbook',
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user