class BannerModel { List records; int total; int size; int current; bool searchCount; int pages; BannerModel( {this.records, this.total, this.size, this.current, this.searchCount, this.pages}); BannerModel.fromJson(Map json) { if (json['records'] != null && json['records'] != []) { records = new List(); json['records'].forEach((v) { records.add(new Records.fromJson(v)); }); }else { json['records'] = []; } 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 && this.records != []) { data['records'] = this.records.map((v) => v.toJson()).toList(); }else { data['records'] = []; } 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 image; int serialNo; int type; String url; int dataId; int dataTable; String imgName; String imgUrl; String imgDesc; int statuz; int jumpType; Records( {this.id, this.jumpType, this.createTime, this.createBy, this.updateTime, this.updateBy, this.image, this.serialNo, this.type, this.url, this.dataId, this.dataTable, this.imgName, this.imgUrl, this.imgDesc, this.statuz}); Records.fromJson(Map json) { id = json['id']; createTime = json['createTime']; createBy = json['createBy']; updateTime = json['updateTime']; updateBy = json['updateBy']; image = json['image']; serialNo = json['serialNo']; type = json['type']; url = json['url']; dataId = json['dataId']; dataTable = json['dataTable']; imgName = json['imgName']; imgUrl = json['imgUrl']; imgDesc = json['imgDesc']; statuz = json['statuz']; jumpType = json['jumpType']; } 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['image'] = this.image; data['serialNo'] = this.serialNo; data['type'] = this.type; data['url'] = this.url; data['dataId'] = this.dataId; data['dataTable'] = this.dataTable; data['imgName'] = this.imgName; data['imgUrl'] = this.imgUrl; data['imgDesc'] = this.imgDesc; data['statuz'] = this.statuz; data['jumpType'] = this.jumpType; return data; } }