mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-19 08:36:17 +08:00
feat: match info
opt dateformat Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
215
lib/models_new/match/match_info/contest.dart
Normal file
215
lib/models_new/match/match_info/contest.dart
Normal file
@@ -0,0 +1,215 @@
|
||||
import 'package:PiliPlus/models_new/match/match_info/home_away.dart';
|
||||
import 'package:PiliPlus/models_new/match/match_info/season.dart';
|
||||
import 'package:PiliPlus/models_new/match/match_info/success_teaminfo.dart';
|
||||
import 'package:PiliPlus/models_new/match/match_info/team.dart';
|
||||
|
||||
class MatchContest {
|
||||
int? id;
|
||||
String? gameStage;
|
||||
int? stime;
|
||||
int? etime;
|
||||
int? homeId;
|
||||
int? awayId;
|
||||
int? homeScore;
|
||||
int? awayScore;
|
||||
int? liveRoom;
|
||||
int? aid;
|
||||
int? collection;
|
||||
String? collectionBvid;
|
||||
int? gameState;
|
||||
String? dic;
|
||||
String? ctime;
|
||||
String? mtime;
|
||||
int? status;
|
||||
int? sid;
|
||||
int? mid;
|
||||
Season? season;
|
||||
MatchTeam? homeTeam;
|
||||
MatchTeam? awayTeam;
|
||||
int? special;
|
||||
int? successTeam;
|
||||
SuccessTeaminfo? successTeaminfo;
|
||||
String? specialName;
|
||||
String? specialTips;
|
||||
String? specialImage;
|
||||
String? playback;
|
||||
String? collectionUrl;
|
||||
String? liveUrl;
|
||||
int? dataType;
|
||||
int? matchId;
|
||||
int? guessType;
|
||||
int? guessShow;
|
||||
String? bvid;
|
||||
String? gameStage1;
|
||||
String? gameStage2;
|
||||
int? liveStatus;
|
||||
int? livePopular;
|
||||
String? liveCover;
|
||||
int? pushSwitch;
|
||||
String? liveTitle;
|
||||
int? seriesId;
|
||||
int? contestStatus;
|
||||
int? contestFreeze;
|
||||
int? startTime;
|
||||
int? endTime;
|
||||
String? title;
|
||||
String? playBack;
|
||||
int? seasonId;
|
||||
int? isSub;
|
||||
int? isGuess;
|
||||
HomeAway? home;
|
||||
HomeAway? away;
|
||||
dynamic series;
|
||||
String? prospect;
|
||||
String? afterContestVideo;
|
||||
int? homeSmallScore;
|
||||
int? awaySmallScore;
|
||||
String? watchPoint;
|
||||
String? watchPointIcon;
|
||||
dynamic hottestPlayer;
|
||||
|
||||
MatchContest({
|
||||
this.id,
|
||||
this.gameStage,
|
||||
this.stime,
|
||||
this.etime,
|
||||
this.homeId,
|
||||
this.awayId,
|
||||
this.homeScore,
|
||||
this.awayScore,
|
||||
this.liveRoom,
|
||||
this.aid,
|
||||
this.collection,
|
||||
this.collectionBvid,
|
||||
this.gameState,
|
||||
this.dic,
|
||||
this.ctime,
|
||||
this.mtime,
|
||||
this.status,
|
||||
this.sid,
|
||||
this.mid,
|
||||
this.season,
|
||||
this.homeTeam,
|
||||
this.awayTeam,
|
||||
this.special,
|
||||
this.successTeam,
|
||||
this.successTeaminfo,
|
||||
this.specialName,
|
||||
this.specialTips,
|
||||
this.specialImage,
|
||||
this.playback,
|
||||
this.collectionUrl,
|
||||
this.liveUrl,
|
||||
this.dataType,
|
||||
this.matchId,
|
||||
this.guessType,
|
||||
this.guessShow,
|
||||
this.bvid,
|
||||
this.gameStage1,
|
||||
this.gameStage2,
|
||||
this.liveStatus,
|
||||
this.livePopular,
|
||||
this.liveCover,
|
||||
this.pushSwitch,
|
||||
this.liveTitle,
|
||||
this.seriesId,
|
||||
this.contestStatus,
|
||||
this.contestFreeze,
|
||||
this.startTime,
|
||||
this.endTime,
|
||||
this.title,
|
||||
this.playBack,
|
||||
this.seasonId,
|
||||
this.isSub,
|
||||
this.isGuess,
|
||||
this.home,
|
||||
this.away,
|
||||
this.series,
|
||||
this.prospect,
|
||||
this.afterContestVideo,
|
||||
this.homeSmallScore,
|
||||
this.awaySmallScore,
|
||||
this.watchPoint,
|
||||
this.watchPointIcon,
|
||||
this.hottestPlayer,
|
||||
});
|
||||
|
||||
factory MatchContest.fromJson(Map<String, dynamic> json) => MatchContest(
|
||||
id: json['id'] as int?,
|
||||
gameStage: json['game_stage'] as String?,
|
||||
stime: json['stime'] as int?,
|
||||
etime: json['etime'] as int?,
|
||||
homeId: json['home_id'] as int?,
|
||||
awayId: json['away_id'] as int?,
|
||||
homeScore: json['home_score'] as int?,
|
||||
awayScore: json['away_score'] as int?,
|
||||
liveRoom: json['live_room'] as int?,
|
||||
aid: json['aid'] as int?,
|
||||
collection: json['collection'] as int?,
|
||||
collectionBvid: json['collection_bvid'] as String?,
|
||||
gameState: json['game_state'] as int?,
|
||||
dic: json['dic'] as String?,
|
||||
ctime: json['ctime'] as String?,
|
||||
mtime: json['mtime'] as String?,
|
||||
status: json['status'] as int?,
|
||||
sid: json['sid'] as int?,
|
||||
mid: json['mid'] as int?,
|
||||
season: json['season'] == null
|
||||
? null
|
||||
: Season.fromJson(json['season'] as Map<String, dynamic>),
|
||||
homeTeam: json['home_team'] == null
|
||||
? null
|
||||
: MatchTeam.fromJson(json['home_team'] as Map<String, dynamic>),
|
||||
awayTeam: json['away_team'] == null
|
||||
? null
|
||||
: MatchTeam.fromJson(json['away_team'] as Map<String, dynamic>),
|
||||
special: json['special'] as int?,
|
||||
successTeam: json['success_team'] as int?,
|
||||
successTeaminfo: json['success_teaminfo'] == null
|
||||
? null
|
||||
: SuccessTeaminfo.fromJson(
|
||||
json['success_teaminfo'] as Map<String, dynamic>),
|
||||
specialName: json['special_name'] as String?,
|
||||
specialTips: json['special_tips'] as String?,
|
||||
specialImage: json['special_image'] as String?,
|
||||
playback: json['playback'] as String?,
|
||||
collectionUrl: json['collection_url'] as String?,
|
||||
liveUrl: json['live_url'] as String?,
|
||||
dataType: json['data_type'] as int?,
|
||||
matchId: json['match_id'] as int?,
|
||||
guessType: json['guess_type'] as int?,
|
||||
guessShow: json['guess_show'] as int?,
|
||||
bvid: json['bvid'] as String?,
|
||||
gameStage1: json['game_stage1'] as String?,
|
||||
gameStage2: json['game_stage2'] as String?,
|
||||
liveStatus: json['live_status'] as int?,
|
||||
livePopular: json['live_popular'] as int?,
|
||||
liveCover: json['live_cover'] as String?,
|
||||
pushSwitch: json['push_switch'] as int?,
|
||||
liveTitle: json['live_title'] as String?,
|
||||
seriesId: json['series_id'] as int?,
|
||||
contestStatus: json['contest_status'] as int?,
|
||||
contestFreeze: json['contest_freeze'] as int?,
|
||||
startTime: json['start_time'] as int?,
|
||||
endTime: json['end_time'] as int?,
|
||||
title: json['title'] as String?,
|
||||
playBack: json['play_back'] as String?,
|
||||
seasonId: json['season_id'] as int?,
|
||||
isSub: json['is_sub'] as int?,
|
||||
isGuess: json['is_guess'] as int?,
|
||||
home: json['home'] == null
|
||||
? null
|
||||
: HomeAway.fromJson(json['home'] as Map<String, dynamic>),
|
||||
away: json['away'] == null
|
||||
? null
|
||||
: HomeAway.fromJson(json['away'] as Map<String, dynamic>),
|
||||
series: json['series'] as dynamic,
|
||||
prospect: json['prospect'] as String?,
|
||||
afterContestVideo: json['after_contest_video'] as String?,
|
||||
homeSmallScore: json['home_small_score'] as int?,
|
||||
awaySmallScore: json['away_small_score'] as int?,
|
||||
watchPoint: json['watch_point'] as String?,
|
||||
watchPointIcon: json['watch_point_icon'] as String?,
|
||||
hottestPlayer: json['hottest_player'] as dynamic,
|
||||
);
|
||||
}
|
||||
13
lib/models_new/match/match_info/data.dart
Normal file
13
lib/models_new/match/match_info/data.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
import 'package:PiliPlus/models_new/match/match_info/contest.dart';
|
||||
|
||||
class MatchInfoData {
|
||||
MatchContest? contest;
|
||||
|
||||
MatchInfoData({this.contest});
|
||||
|
||||
factory MatchInfoData.fromJson(Map<String, dynamic> json) => MatchInfoData(
|
||||
contest: json['contest'] == null
|
||||
? null
|
||||
: MatchContest.fromJson(json['contest'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
41
lib/models_new/match/match_info/home_away.dart
Normal file
41
lib/models_new/match/match_info/home_away.dart
Normal file
@@ -0,0 +1,41 @@
|
||||
class HomeAway {
|
||||
int? id;
|
||||
String? icon;
|
||||
String? name;
|
||||
int? wins;
|
||||
String? region;
|
||||
int? regionId;
|
||||
int? externalTeamId;
|
||||
String? divisionName;
|
||||
String? divisionLogo;
|
||||
dynamic playerGradeDetail;
|
||||
bool? isSuccessTeam;
|
||||
|
||||
HomeAway({
|
||||
this.id,
|
||||
this.icon,
|
||||
this.name,
|
||||
this.wins,
|
||||
this.region,
|
||||
this.regionId,
|
||||
this.externalTeamId,
|
||||
this.divisionName,
|
||||
this.divisionLogo,
|
||||
this.playerGradeDetail,
|
||||
this.isSuccessTeam,
|
||||
});
|
||||
|
||||
factory HomeAway.fromJson(Map<String, dynamic> json) => HomeAway(
|
||||
id: json['id'] as int?,
|
||||
icon: json['icon'] as String?,
|
||||
name: json['name'] as String?,
|
||||
wins: json['wins'] as int?,
|
||||
region: json['region'] as String?,
|
||||
regionId: json['region_id'] as int?,
|
||||
externalTeamId: json['ExternalTeamId'] as int?,
|
||||
divisionName: json['division_name'] as String?,
|
||||
divisionLogo: json['division_logo'] as String?,
|
||||
playerGradeDetail: json['player_grade_detail'] as dynamic,
|
||||
isSuccessTeam: json['is_success_team'] as bool?,
|
||||
);
|
||||
}
|
||||
83
lib/models_new/match/match_info/season.dart
Normal file
83
lib/models_new/match/match_info/season.dart
Normal file
@@ -0,0 +1,83 @@
|
||||
class Season {
|
||||
int? id;
|
||||
int? mid;
|
||||
String? title;
|
||||
String? subTitle;
|
||||
int? stime;
|
||||
int? etime;
|
||||
String? sponsor;
|
||||
String? logo;
|
||||
String? dic;
|
||||
int? status;
|
||||
int? ctime;
|
||||
int? mtime;
|
||||
int? rank;
|
||||
int? isApp;
|
||||
String? url;
|
||||
String? dataFocus;
|
||||
String? focusUrl;
|
||||
int? leidaSid;
|
||||
int? gameType;
|
||||
String? searchImage;
|
||||
int? syncPlatform;
|
||||
String? centreLogo;
|
||||
int? centreStatus;
|
||||
String? centrePcLogo;
|
||||
int? seasonType;
|
||||
|
||||
Season({
|
||||
this.id,
|
||||
this.mid,
|
||||
this.title,
|
||||
this.subTitle,
|
||||
this.stime,
|
||||
this.etime,
|
||||
this.sponsor,
|
||||
this.logo,
|
||||
this.dic,
|
||||
this.status,
|
||||
this.ctime,
|
||||
this.mtime,
|
||||
this.rank,
|
||||
this.isApp,
|
||||
this.url,
|
||||
this.dataFocus,
|
||||
this.focusUrl,
|
||||
this.leidaSid,
|
||||
this.gameType,
|
||||
this.searchImage,
|
||||
this.syncPlatform,
|
||||
this.centreLogo,
|
||||
this.centreStatus,
|
||||
this.centrePcLogo,
|
||||
this.seasonType,
|
||||
});
|
||||
|
||||
factory Season.fromJson(Map<String, dynamic> json) => Season(
|
||||
id: json['id'] as int?,
|
||||
mid: json['mid'] as int?,
|
||||
title: json['title'] as String?,
|
||||
subTitle: json['sub_title'] as String?,
|
||||
stime: json['stime'] as int?,
|
||||
etime: json['etime'] as int?,
|
||||
sponsor: json['sponsor'] as String?,
|
||||
logo: json['logo'] as String?,
|
||||
dic: json['dic'] as String?,
|
||||
status: json['status'] as int?,
|
||||
ctime: json['ctime'] as int?,
|
||||
mtime: json['mtime'] as int?,
|
||||
rank: json['rank'] as int?,
|
||||
isApp: json['is_app'] as int?,
|
||||
url: json['url'] as String?,
|
||||
dataFocus: json['data_focus'] as String?,
|
||||
focusUrl: json['focus_url'] as String?,
|
||||
leidaSid: json['leida_sid'] as int?,
|
||||
gameType: json['game_type'] as int?,
|
||||
searchImage: json['search_image'] as String?,
|
||||
syncPlatform: json['sync_platform'] as int?,
|
||||
centreLogo: json['centre_logo'] as String?,
|
||||
centreStatus: json['centre_status'] as int?,
|
||||
centrePcLogo: json['centre_pc_logo'] as String?,
|
||||
seasonType: json['season_type'] as int?,
|
||||
);
|
||||
}
|
||||
67
lib/models_new/match/match_info/success_teaminfo.dart
Normal file
67
lib/models_new/match/match_info/success_teaminfo.dart
Normal file
@@ -0,0 +1,67 @@
|
||||
class SuccessTeaminfo {
|
||||
int? id;
|
||||
String? title;
|
||||
String? subTitle;
|
||||
String? eTitle;
|
||||
int? createTime;
|
||||
String? area;
|
||||
String? logo;
|
||||
int? uid;
|
||||
String? members;
|
||||
String? dic;
|
||||
int? isDeleted;
|
||||
String? videoUrl;
|
||||
String? profile;
|
||||
int? leidaTid;
|
||||
int? replyId;
|
||||
int? teamType;
|
||||
int? regionId;
|
||||
String? divisionName;
|
||||
String? divisionLogo;
|
||||
|
||||
SuccessTeaminfo({
|
||||
this.id,
|
||||
this.title,
|
||||
this.subTitle,
|
||||
this.eTitle,
|
||||
this.createTime,
|
||||
this.area,
|
||||
this.logo,
|
||||
this.uid,
|
||||
this.members,
|
||||
this.dic,
|
||||
this.isDeleted,
|
||||
this.videoUrl,
|
||||
this.profile,
|
||||
this.leidaTid,
|
||||
this.replyId,
|
||||
this.teamType,
|
||||
this.regionId,
|
||||
this.divisionName,
|
||||
this.divisionLogo,
|
||||
});
|
||||
|
||||
factory SuccessTeaminfo.fromJson(Map<String, dynamic> json) {
|
||||
return SuccessTeaminfo(
|
||||
id: json['id'] as int?,
|
||||
title: json['title'] as String?,
|
||||
subTitle: json['sub_title'] as String?,
|
||||
eTitle: json['e_title'] as String?,
|
||||
createTime: json['create_time'] as int?,
|
||||
area: json['area'] as String?,
|
||||
logo: json['logo'] as String?,
|
||||
uid: json['uid'] as int?,
|
||||
members: json['members'] as String?,
|
||||
dic: json['dic'] as String?,
|
||||
isDeleted: json['is_deleted'] as int?,
|
||||
videoUrl: json['video_url'] as String?,
|
||||
profile: json['profile'] as String?,
|
||||
leidaTid: json['leida_tid'] as int?,
|
||||
replyId: json['reply_id'] as int?,
|
||||
teamType: json['team_type'] as int?,
|
||||
regionId: json['region_id'] as int?,
|
||||
divisionName: json['division_name'] as String?,
|
||||
divisionLogo: json['division_logo'] as String?,
|
||||
);
|
||||
}
|
||||
}
|
||||
87
lib/models_new/match/match_info/team.dart
Normal file
87
lib/models_new/match/match_info/team.dart
Normal file
@@ -0,0 +1,87 @@
|
||||
class MatchTeam {
|
||||
int? id;
|
||||
String? title;
|
||||
String? subTitle;
|
||||
String? eTitle;
|
||||
int? createTime;
|
||||
String? area;
|
||||
String? logo;
|
||||
int? uid;
|
||||
String? members;
|
||||
String? dic;
|
||||
int? isDeleted;
|
||||
String? videoUrl;
|
||||
String? profile;
|
||||
int? leidaTid;
|
||||
int? replyId;
|
||||
int? teamType;
|
||||
int? regionId;
|
||||
String? divisionName;
|
||||
String? divisionLogo;
|
||||
|
||||
MatchTeam({
|
||||
this.id,
|
||||
this.title,
|
||||
this.subTitle,
|
||||
this.eTitle,
|
||||
this.createTime,
|
||||
this.area,
|
||||
this.logo,
|
||||
this.uid,
|
||||
this.members,
|
||||
this.dic,
|
||||
this.isDeleted,
|
||||
this.videoUrl,
|
||||
this.profile,
|
||||
this.leidaTid,
|
||||
this.replyId,
|
||||
this.teamType,
|
||||
this.regionId,
|
||||
this.divisionName,
|
||||
this.divisionLogo,
|
||||
});
|
||||
|
||||
factory MatchTeam.fromJson(Map<String, dynamic> json) => MatchTeam(
|
||||
id: json['id'] as int?,
|
||||
title: json['title'] as String?,
|
||||
subTitle: json['sub_title'] as String?,
|
||||
eTitle: json['e_title'] as String?,
|
||||
createTime: json['create_time'] as int?,
|
||||
area: json['area'] as String?,
|
||||
logo: json['logo'] as String?,
|
||||
uid: json['uid'] as int?,
|
||||
members: json['members'] as String?,
|
||||
dic: json['dic'] as String?,
|
||||
isDeleted: json['is_deleted'] as int?,
|
||||
videoUrl: json['video_url'] as String?,
|
||||
profile: json['profile'] as String?,
|
||||
leidaTid: json['leida_tid'] as int?,
|
||||
replyId: json['reply_id'] as int?,
|
||||
teamType: json['team_type'] as int?,
|
||||
regionId: json['region_id'] as int?,
|
||||
divisionName: json['division_name'] as String?,
|
||||
divisionLogo: json['division_logo'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'id': id,
|
||||
'title': title,
|
||||
'sub_title': subTitle,
|
||||
'e_title': eTitle,
|
||||
'create_time': createTime,
|
||||
'area': area,
|
||||
'logo': logo,
|
||||
'uid': uid,
|
||||
'members': members,
|
||||
'dic': dic,
|
||||
'is_deleted': isDeleted,
|
||||
'video_url': videoUrl,
|
||||
'profile': profile,
|
||||
'leida_tid': leidaTid,
|
||||
'reply_id': replyId,
|
||||
'team_type': teamType,
|
||||
'region_id': regionId,
|
||||
'division_name': divisionName,
|
||||
'division_logo': divisionLogo,
|
||||
};
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:PiliPlus/models/model_video.dart';
|
||||
import 'package:PiliPlus/utils/utils.dart';
|
||||
import 'package:PiliPlus/utils/duration_util.dart';
|
||||
|
||||
class VListItemModel extends BaseVideoItemModel {
|
||||
int? comment;
|
||||
@@ -20,7 +20,9 @@ class VListItemModel extends BaseVideoItemModel {
|
||||
title = json['title'];
|
||||
review = json['review'];
|
||||
pubdate = json['created'];
|
||||
if (json['length'] != null) duration = Utils.duration(json['length']);
|
||||
if (json['length'] != null) {
|
||||
duration = DurationUtil.parseDuration(json['length']);
|
||||
}
|
||||
aid = json['aid'];
|
||||
bvid = json['bvid'];
|
||||
hideClick = json['hide_click'];
|
||||
|
||||
Reference in New Issue
Block a user