class PerformanceInfoModel { String code; String msg; Data data; PerformanceInfoModel({this.code, this.msg, this.data}); PerformanceInfoModel.fromJson(Map json) { code = json['code']; msg = json['msg']; data = json['data'] != null ? new Data.fromJson(json['data']) : null; } Map toJson() { final Map data = new Map(); data['code'] = this.code; data['msg'] = this.msg; if (this.data != null) { data['data'] = this.data.toJson(); } return data; } } class Data { List list; Statistics statistics; Data({this.list, this.statistics}); Data.fromJson(Map json) { if (json['list'] != null) { list = []; json['list'].forEach((v) { list.add(new PerformanceList.fromJson(v)); }); } statistics = json['statistics'] != null ? new Statistics.fromJson(json['statistics']) : null; } Map toJson() { final Map data = new Map(); if (this.list != null) { data['list'] = this.list.map((v) => v.toJson()).toList(); } if (this.statistics != null) { data['statistics'] = this.statistics.toJson(); } return data; } } class PerformanceList { String nickname; String avatarPath; int userId; num salesAmount; num role; PerformanceList( {this.nickname, this.avatarPath, this.userId, this.salesAmount, this.role}); PerformanceList.fromJson(Map json) { nickname = json['nickname']; avatarPath = json['avatarPath']; userId = json['userId']; salesAmount = json['salesAmount']; role = json['role']; } Map toJson() { final Map data = new Map(); data['nickname'] = this.nickname; data['avatarPath'] = this.avatarPath; data['userId'] = this.userId; data['salesAmount'] = this.salesAmount; data['role'] = this.role; return data; } } class Statistics { num salesAmount; num income; num subIncome; num ratio; num actualIncome; Statistics( {this.salesAmount, this.income, this.subIncome, this.ratio, this.actualIncome}); Statistics.fromJson(Map json) { salesAmount = json['salesAmount']; income = json['income']; subIncome = json['subIncome']; ratio = json['ratio']; actualIncome = json['actualIncome']; } Map toJson() { final Map data = new Map(); data['salesAmount'] = this.salesAmount; data['income'] = this.income; data['subIncome'] = this.subIncome; data['ratio'] = this.ratio; data['actualIncome'] = this.actualIncome; return data; } }