import '../../model/video/video_model.dart';
|
|
/// Id : "134"
|
/// Name : "大家都在看"
|
/// Createtime : "1640316645416"
|
/// HomeVideoList : [{"Id":"77684","Video":{"Id":""},"Picture":"","Tag":"","Orderby":90,"BigPicture":false,"VideoId":"38abe4cc5c733290101fa0699dbace2a","Createtime":"1640340085417"}]
|
/// Activity : ""
|
/// Params : ""
|
/// HasMore : false
|
/// NeedAd : false
|
/// IosControl : ""
|
/// Icon : ""
|
/// Columns : 3
|
/// Number : 18
|
/// RefreshPosition : 0
|
/// MoreTag : ""
|
/// Count : 19
|
|
class HomeTypeModel {
|
HomeTypeModel({
|
String? id,
|
String? name,
|
String? createtime,
|
List<HomeVideoModel>? homeVideoList,
|
String? activity,
|
String? params,
|
bool? hasMore,
|
bool? needAd,
|
String? iosControl,
|
String? icon,
|
int? columns,
|
int? number,
|
int? refreshPosition,
|
String? moreTag,
|
int? count,
|
}) {
|
_id = id;
|
_name = name;
|
_createtime = createtime;
|
_homeVideoList = homeVideoList;
|
_activity = activity;
|
_params = params;
|
_hasMore = hasMore;
|
_needAd = needAd;
|
_iosControl = iosControl;
|
_icon = icon;
|
_columns = columns;
|
_number = number;
|
_refreshPosition = refreshPosition;
|
_moreTag = moreTag;
|
_count = count;
|
}
|
|
HomeTypeModel.fromJson(dynamic json) {
|
_id = json['Id'];
|
_name = json['Name'];
|
_createtime = json['Createtime'];
|
if (json['HomeVideoList'] != null) {
|
_homeVideoList = [];
|
json['HomeVideoList'].forEach((v) {
|
_homeVideoList?.add(HomeVideoModel.fromJson(v));
|
});
|
}
|
_activity = json['Activity'];
|
_params = json['Params'];
|
_hasMore = json['HasMore'];
|
_needAd = json['NeedAd'];
|
_iosControl = json['IosControl'];
|
_icon = json['Icon'];
|
_columns = json['Columns'];
|
_number = json['Number'];
|
_refreshPosition = json['RefreshPosition'];
|
_moreTag = json['MoreTag'];
|
_count = json['Count'];
|
}
|
|
String? _id;
|
String? _name;
|
String? _createtime;
|
List<HomeVideoModel>? _homeVideoList;
|
String? _activity;
|
String? _params;
|
bool? _hasMore;
|
bool? _needAd;
|
String? _iosControl;
|
String? _icon;
|
int? _columns;
|
int? _number;
|
int? _refreshPosition;
|
String? _moreTag;
|
int? _count;
|
|
String? get id => _id;
|
|
String? get name => _name;
|
|
String? get createtime => _createtime;
|
|
List<HomeVideoModel>? get homeVideoList => _homeVideoList;
|
|
String? get activity => _activity;
|
|
String? get params => _params;
|
|
bool? get hasMore => _hasMore;
|
|
bool? get needAd => _needAd;
|
|
String? get iosControl => _iosControl;
|
|
String? get icon => _icon;
|
|
int? get columns => _columns;
|
|
int? get number => _number;
|
|
int? get refreshPosition => _refreshPosition;
|
|
String? get moreTag => _moreTag;
|
|
int? get count => _count;
|
|
Map<String, dynamic> toJson() {
|
final map = <String, dynamic>{};
|
map['Id'] = _id;
|
map['Name'] = _name;
|
map['Createtime'] = _createtime;
|
if (_homeVideoList != null) {
|
map['HomeVideoList'] = _homeVideoList?.map((v) => v.toJson()).toList();
|
}
|
map['Activity'] = _activity;
|
map['Params'] = _params;
|
map['HasMore'] = _hasMore;
|
map['NeedAd'] = _needAd;
|
map['IosControl'] = _iosControl;
|
map['Icon'] = _icon;
|
map['Columns'] = _columns;
|
map['Number'] = _number;
|
map['RefreshPosition'] = _refreshPosition;
|
map['MoreTag'] = _moreTag;
|
map['Count'] = _count;
|
return map;
|
}
|
}
|
|
/// Id : "77684"
|
/// Video : {"Id":""}
|
/// Picture : ""
|
/// Tag : ""
|
/// Orderby : 90
|
/// BigPicture : false
|
/// VideoId : "38abe4cc5c733290101fa0699dbace2a"
|
/// Createtime : "1640340085417"
|
|
class HomeVideoModel {
|
HomeVideoModel({
|
String? id,
|
VideoInfoModel? video,
|
String? picture,
|
String? tag,
|
int? orderby,
|
bool? bigPicture,
|
String? videoId,
|
}) {
|
_id = id;
|
_video = video;
|
_picture = picture;
|
_tag = tag;
|
_orderby = orderby;
|
_bigPicture = bigPicture;
|
_videoId = videoId;
|
}
|
|
HomeVideoModel.fromJson(dynamic json) {
|
_id = json['Id'];
|
_video =
|
json['Video'] != null ? VideoInfoModel.fromJson(json['Video']) : null;
|
_picture = json['Picture'];
|
_tag = json['Tag'];
|
_orderby = json['Orderby'];
|
_bigPicture = json['BigPicture'];
|
_videoId = json['VideoId'];
|
}
|
|
String? _id;
|
VideoInfoModel? _video;
|
String? _picture;
|
String? _tag;
|
int? _orderby;
|
bool? _bigPicture;
|
String? _videoId;
|
|
String? get id => _id;
|
|
VideoInfoModel? get video => _video;
|
|
String? get picture => _picture;
|
|
String? get tag => _tag;
|
|
int? get orderby => _orderby;
|
|
bool? get bigPicture => _bigPicture;
|
|
String? get videoId => _videoId;
|
|
|
Map<String, dynamic> toJson() {
|
final map = <String, dynamic>{};
|
map['Id'] = _id;
|
if (_video != null) {
|
map['Video'] = _video?.toJson();
|
}
|
map['Picture'] = _picture;
|
map['Tag'] = _tag;
|
map['Orderby'] = _orderby;
|
map['BigPicture'] = _bigPicture;
|
map['VideoId'] = _videoId;
|
return map;
|
}
|
}
|