class CommissionIncomeModel { String code; String msg; Data data; CommissionIncomeModel({this.code, this.msg, this.data}); CommissionIncomeModel.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 IncomeList.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 IncomeList { int id; num amount; String title; String comment; String orderTime; IncomeList({this.id, this.amount, this.title, this.comment, this.orderTime}); IncomeList.fromJson(Map json) { id = json['id']; amount = json['amount']; title = json['title']; comment = json['comment']; orderTime = json['orderTime']; } Map toJson() { final Map data = new Map(); data['id'] = this.id; data['amount'] = this.amount; data['title'] = this.title; data['comment'] = this.comment; data['orderTime'] = this.orderTime; return data; } } class Statistics { num orderCount; num income; num salesAmount; Statistics({this.orderCount, this.income, this.salesAmount}); Statistics.fromJson(Map json) { orderCount = json['orderCount']; income = json['income']; salesAmount = json['salesAmount']; } Map toJson() { final Map data = new Map(); data['orderCount'] = this.orderCount; data['income'] = this.income; data['salesAmount'] = this.salesAmount; return data; } }