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_flutter
  • lib
  • models
  • knowledge_model.dart
  • chenxianqi's avatar
    update kefu_client style · f8f7c88e
    chenxianqi committed 5 years ago
    f8f7c88e
knowledge_model.dart 1.03 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
class KnowledgeModel {
  String title;
  String subTitle;
  String content;
  int id;
  int uid;
  int platform;
  int updateAt;
  int createAt;

  KnowledgeModel(
      {this.title,
      this.subTitle,
      this.content,
      this.id,
      this.uid,
      this.platform,
      this.updateAt,
      this.createAt});

  KnowledgeModel.fromJson(Map<String, dynamic> json) {
    this.title = json['title'];
    this.subTitle = json['sub_title'];
    this.content = json['content'];
    this.id = json['id'];
    this.uid = json['uid'];
    this.platform = json['platform'];
    this.updateAt = json['update_at'];
    this.createAt = json['create_at'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['title'] = this.title;
    data['sub_title'] = this.subTitle;
    data['content'] = this.content;
    data['id'] = this.id;
    data['uid'] = this.uid;
    data['platform'] = this.platform;
    data['update_at'] = this.updateAt;
    data['create_at'] = this.createAt;
    return data;
  }
}