123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- class JogSum {
- Sum? sum;
- List<Records>? records;
- JogSum({this.sum, this.records});
- JogSum.fromJson(Map<String, dynamic> json) {
- sum = json['sum'] != null ? new Sum.fromJson(json['sum']) : null;
- if (json['records'] != null) {
- records = [];
- json['records'].forEach((v) {
- records!.add(new Records.fromJson(v));
- });
- }
- }
- Map<String, dynamic> toJson() {
- final Map<String, dynamic> data = new Map<String, dynamic>();
- if (this.sum != null) {
- data['sum'] = this.sum!.toJson();
- }
- if (this.records != null) {
- data['records'] = this.records!.map((v) => v.toJson()).toList();
- }
- return data;
- }
- }
- class Sum {
- int? distance;
- int? duration;
- int? times;
- int? kmDuration;
- Sum({this.distance, this.duration, this.times, this.kmDuration});
- Sum.fromJson(Map<String, dynamic> json) {
- distance = json['distance'];
- duration = json['duration'];
- times = json['times'];
- kmDuration = json['km_duration'];
- }
- Map<String, dynamic> toJson() {
- final Map<String, dynamic> data = new Map<String, dynamic>();
- data['distance'] = this.distance;
- data['duration'] = this.duration;
- data['times'] = this.times;
- data['km_duration'] = this.kmDuration;
- return data;
- }
- }
- class Records {
- int? month;
- int? distance;
- int? duration;
- int? kmDuration;
- List<SumRecords>? records;
- bool expand = true;
- Records(
- {this.month,
- this.distance,
- this.duration,
- this.kmDuration,
- this.records});
- Records.fromJson(Map<String, dynamic> json) {
- month = json['month'];
- distance = json['distance'];
- duration = json['duration'];
- kmDuration = json['km_duration'];
- if (json['records'] != null) {
- records = [];
- json['records'].forEach((v) {
- records!.add(new SumRecords.fromJson(v));
- });
- }
- }
- Map<String, dynamic> toJson() {
- final Map<String, dynamic> data = new Map<String, dynamic>();
- data['month'] = this.month;
- data['distance'] = this.distance;
- data['duration'] = this.duration;
- data['km_duration'] = this.kmDuration;
- if (this.records != null) {
- data['records'] = this.records!.map((v) => v.toJson()).toList();
- }
- return data;
- }
- }
- class SumRecords {
- int? id;
- int? distance;
- int? duration;
- String? begin;
- String? end;
- int? kmDuration;
- SumRecords(
- {this.id, this.distance, this.duration, this.begin, this.end, this.kmDuration});
- SumRecords.fromJson(Map<String, dynamic> json) {
- id = json['id'];
- distance = json['distance'];
- duration = json['duration'];
- begin = json['begin'];
- end = json['end'];
- kmDuration = json['km_duration'];
- }
- Map<String, dynamic> toJson() {
- final Map<String, dynamic> data = new Map<String, dynamic>();
- data['distance'] = this.distance;
- data['duration'] = this.duration;
- data['begin'] = this.begin;
- data['end'] = this.end;
- data['km_duration'] = this.kmDuration;
- return data;
- }
- }
|