class VideoModel { List records; int total; int size; int current; bool searchCount; int pages; VideoModel( {this.records, this.total, this.size, this.current, this.searchCount, this.pages}); VideoModel.fromJson(Map json) { if (json['records'] != null) { records = new List(); json['records'].forEach((v) { records.add(new Records.fromJson(v)); }); } total = json['total']; size = json['size']; current = json['current']; searchCount = json['searchCount']; pages = json['pages']; } Map toJson() { final Map data = new Map(); if (this.records != null) { data['records'] = this.records.map((v) => v.toJson()).toList(); } data['total'] = this.total; data['size'] = this.size; data['current'] = this.current; data['searchCount'] = this.searchCount; data['pages'] = this.pages; return data; } } class Records { int id; int createTime; String createBy; int updateTime; String updateBy; String title; String descr; String cover; String url; int brandId; String userId; double reward; int favoriteNum; int likeNum; int browseNum; int hotFlag; int payNum; int statuz; int checkFlag; String checkComment; int platformFlag; String brandName; Records( {this.id, this.createTime, this.createBy, this.updateTime, this.updateBy, this.title, this.descr, this.cover, this.url, this.brandId, this.userId, this.reward, this.favoriteNum, this.likeNum, this.browseNum, this.hotFlag, this.payNum, this.statuz, this.checkFlag, this.checkComment, this.platformFlag, this.brandName}); Records.fromJson(Map json) { id = json['id']; createTime = json['createTime']; createBy = json['createBy']; updateTime = json['updateTime']; updateBy = json['updateBy']; title = json['title']; descr = json['descr']; cover = json['cover']; url = json['url']; brandId = json['brandId']; userId = json['userId']; reward = json['reward']; favoriteNum = json['favoriteNum']; likeNum = json['likeNum']; browseNum = json['browseNum']; hotFlag = json['hotFlag']; payNum = json['payNum']; statuz = json['statuz']; checkFlag = json['checkFlag']; checkComment = json['checkComment']; platformFlag = json['platformFlag']; brandName = json['brandName']; } Map toJson() { final Map data = new Map(); data['id'] = this.id; data['createTime'] = this.createTime; data['createBy'] = this.createBy; data['updateTime'] = this.updateTime; data['updateBy'] = this.updateBy; data['title'] = this.title; data['descr'] = this.descr; data['cover'] = this.cover; data['url'] = this.url; data['brandId'] = this.brandId; data['userId'] = this.userId; data['reward'] = this.reward; data['favoriteNum'] = this.favoriteNum; data['likeNum'] = this.likeNum; data['browseNum'] = this.browseNum; data['hotFlag'] = this.hotFlag; data['payNum'] = this.payNum; data['statuz'] = this.statuz; data['checkFlag'] = this.checkFlag; data['checkComment'] = this.checkComment; data['platformFlag'] = this.platformFlag; data['brandName'] = this.brandName; return data; } }