1
This commit is contained in:
@@ -71,14 +71,22 @@ class UploadService {
|
||||
|
||||
/// 视频分类
|
||||
class VideoCategory {
|
||||
VideoCategory({required this.categoryId, required this.name});
|
||||
VideoCategory({
|
||||
required this.categoryId,
|
||||
required this.name,
|
||||
this.hasSeries = false,
|
||||
});
|
||||
|
||||
final int categoryId;
|
||||
final String name;
|
||||
|
||||
/// 系列型分类(如 AI短剧):列表按「剧」聚合展示,一部剧只占一张卡片
|
||||
final bool hasSeries;
|
||||
|
||||
factory VideoCategory.fromJson(Map<String, dynamic> json) => VideoCategory(
|
||||
categoryId: (json['category_id'] as num?)?.toInt() ?? 0,
|
||||
name: (json['name'] as String?) ?? '',
|
||||
hasSeries: (json['has_series'] as bool?) ?? false,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user