初始化

This commit is contained in:
谢宇宁
2026-09-15 15:44:13 +07:00
commit a23ba685e9
1065 changed files with 101122 additions and 0 deletions
@@ -0,0 +1,21 @@
class WatchCount {
int? watchCount; // 剩余免费观看次数
int? total; // 免费观看总次数(后端下发,用于"剩余 x/y 次"展示)
bool? isCan; // 金币视频不再免费次数内
//⚠️注意: coinWatchCount: 活动权益金币视频免费观看次数, 需要手动赋值,
int coinWatchCount = -1; //短视频业务专用, 因为短视频业务提前预加载数据,需要copy对象,保存当前对应的count值
static WatchCount fromJson(Map<String, dynamic>? map) {
map ??= {};
return WatchCount()
..watchCount = map['watchCount']
..total = map['total']
..isCan = map['isCan'];
}
//只复制展示用的次数;coinWatchCount 按注释由调用方自行赋值
WatchCount copy() => WatchCount()
..watchCount = watchCount
..total = total;
}