class MainPageContentType { final int id; final String title; final String image; final String? link; final String? file; bool marked; bool isViewed; final List subtitles; final int? duration; final String? description; final String? riskScore; /// uuid محتوای جدید (content-service). برای صفحه‌های جزئیات بومی استفاده /// می‌شود تا با id درست از API جدید fetch کنیم. final String? contentId; MainPageContentType({ required this.id, required this.title, required this.image, required this.link, this.file, required this.marked, required this.isViewed, required this.subtitles, this.duration, this.description, this.riskScore, this.contentId, }); factory MainPageContentType.fromJson(Map json) => MainPageContentType( id: json['id'], title: json['title'], image: json['image'], link: json['link'] as String?, file: json['file'] as String?, marked: json['marked'], isViewed: json['isViewed'] ?? false, subtitles: List.from(json['subtitles']), duration: json['duration'], description: json['description'], riskScore: json['score'], ); }