Files
PiliPlus/lib/models/model_video.dart
bggRGjQaUbCoE b149ee4998 opt ui
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-06-06 12:47:26 +08:00

55 lines
957 B
Dart

abstract class BaseSimpleVideoItemModel {
late String title;
String? bvid;
int? cid;
String? cover;
int duration = -1;
late BaseOwner owner;
late BaseStat stat;
}
abstract class BaseVideoItemModel extends BaseSimpleVideoItemModel {
int? aid;
String? desc;
int? pubdate;
bool isFollowed = false;
}
abstract class BaseOwner {
int? mid;
String? name;
}
abstract class BaseStat {
int? view;
int? like;
int? danmu;
}
class Stat extends BaseStat {
Stat.fromJson(Map<String, dynamic> json) {
view = json["view"];
like = json["like"];
danmu = json['danmaku'];
}
}
class PlayStat extends BaseStat {
PlayStat.fromJson(Map<String, dynamic> json) {
view = json['play'];
danmu = json['danmaku'];
}
}
class Dimension {
int? width;
int? height;
int? rotate;
Dimension.fromJson(Map<String, dynamic> json) {
width = json["width"];
height = json["height"];
rotate = json["rotate"];
}
}