Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

杨树贤 / kefu_server

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Settings
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Find file
BlameHistoryPermalink
Switch branch/tag
  • kefu_server
  • ui
  • kefu_workbench
  • lib
  • models
  • statistical_count_model.dart
  • chenxianqi's avatar
    增加kefu_workbench · a18da124
    chenxianqi committed 5 years ago
    a18da124
statistical_count_model.dart 1.18 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
class StatisticalCountModel {
  String date;
  List<StatisticalItems> statisticalItems;

  StatisticalCountModel({this.date, this.statisticalItems});

  StatisticalCountModel.fromJson(Map<String, dynamic> json) {
    date = json['date'];
    if (json['list'] != null) {
      statisticalItems = new List<StatisticalItems>();
      json['list'].forEach((v) {
        statisticalItems.add(new StatisticalItems.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['date'] = this.date;
    if (this.statisticalItems != null) {
      data['list'] =
          this.statisticalItems.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class StatisticalItems {
  String count;
  String id;
  String title;

  StatisticalItems({this.count, this.id, this.title});

  StatisticalItems.fromJson(Map<String, dynamic> json) {
    count = json['count'];
    id = json['id'];
    title = json['title'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['count'] = this.count;
    data['id'] = this.id;
    data['title'] = this.title;
    return data;
  }
}