Files
PiliPlus/lib/models/model_rec_video_item.dart
bggRGjQaUbCoE b960359a39 opt models
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
2025-06-05 14:44:56 +08:00

52 lines
1.3 KiB
Dart

import 'package:PiliPlus/models/model_owner.dart';
import 'package:PiliPlus/models/model_video.dart';
abstract class BaseRecVideoItemModel extends BaseVideoItemModel {
String? goto;
String? uri;
String? rcmdReason;
// app推荐专属
int? param;
String? pgcBadge;
}
class RecVideoItemModel extends BaseRecVideoItemModel {
RecVideoItemModel.fromJson(Map<String, dynamic> json) {
aid = json["id"];
bvid = json["bvid"];
cid = json["cid"];
goto = json["goto"];
uri = json["uri"];
cover = json["pic"];
title = json["title"];
duration = json["duration"];
pubdate = json["pubdate"];
owner = Owner.fromJson(json["owner"]);
stat = Stat.fromJson(json["stat"]);
isFollowed = json["is_followed"] == 1;
// rcmdReason = json["rcmd_reason"] != null
// ? RcmdReason.fromJson(json["rcmd_reason"])
// : RcmdReason(content: '');
rcmdReason = json["rcmd_reason"]?['content'];
}
// @override
// String? get desc => null;
}
// @HiveType(typeId: 2)
// class RcmdReason {
// RcmdReason({
// this.reasonType,
// this.content,
// });
// // int? reasonType;
// // String? content;
//
// RcmdReason.fromJson(Map<String, dynamic> json) {
// reasonType = json["reason_type"];
// content = json["content"] ?? '';
// }
// }