Files
PiliPlus/lib/models/video_detail/ugc_season.dart
bggRGjQaUbCoE 924d51d41b opt handle res
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-05-29 17:17:42 +08:00

55 lines
1.4 KiB
Dart

import 'package:PiliPlus/models/video_detail/section.dart';
import 'package:PiliPlus/models/video_detail/stat.dart';
class UgcSeason {
int? id;
String? title;
String? cover;
int? mid;
String? intro;
int? signState;
int? attribute;
List<SectionItem>? sections;
Stat? stat;
int? epCount;
int? seasonType;
bool? isPaySeason;
int? enableVt;
UgcSeason({
this.id,
this.title,
this.cover,
this.mid,
this.intro,
this.signState,
this.attribute,
this.sections,
this.stat,
this.epCount,
this.seasonType,
this.isPaySeason,
this.enableVt,
});
factory UgcSeason.fromJson(Map<String, dynamic> json) => UgcSeason(
id: json['id'] as int?,
title: json['title'] as String?,
cover: json['cover'] as String?,
mid: json['mid'] as int?,
intro: json['intro'] as String?,
signState: json['sign_state'] as int?,
attribute: json['attribute'] as int?,
sections: (json['sections'] as List<dynamic>?)
?.map((e) => SectionItem.fromJson(e as Map<String, dynamic>))
.toList(),
stat: json['stat'] == null
? null
: Stat.fromJson(json['stat'] as Map<String, dynamic>),
epCount: json['ep_count'] as int?,
seasonType: json['season_type'] as int?,
isPaySeason: json['is_pay_season'] as bool?,
enableVt: json['enable_vt'] as int?,
);
}