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
Normal viewHistoryPermalink
Switch branch/tag
  • kefu_server
  • ui
  • kefu_workbench
  • lib
  • models
  • user_model.dart
user_model.dart 1.56 KB
Edit
chenxianqi's avatar
增加kefu_workbench
a18da124
 
chenxianqi committed 5 years ago
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 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
class UserModel {
  String avatar;
  String address;
  String nickname;
  String token;
  String phone;
  String remarks;
  int id;
  int uid;
  int platform;
  int online;
  int updateAt;
  int lastActivity;
  int createAt;

  UserModel(
      {this.avatar,
      this.address,
      this.nickname,
      this.token,
      this.phone,
      this.remarks,
      this.id,
      this.uid,
      this.platform,
      this.online,
      this.updateAt,
      this.lastActivity,
      this.createAt});

  UserModel.fromJson(Map<String, dynamic> json) {
    this.avatar = json['avatar'];
    this.address = json['address'];
    this.nickname = json['nickname'];
    this.token = json['token'];
    this.phone = json['phone'];
    this.remarks = json['remarks'];
    this.id = json['id'];
    this.uid = json['uid'];
    this.platform = json['platform'];
    this.online = json['online'];
    this.updateAt = json['update_at'];
    this.lastActivity = json['last_activity'];
    this.createAt = json['create_at'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['avatar'] = this.avatar;
    data['address'] = this.address;
    data['nickname'] = this.nickname;
    data['token'] = this.token;
    data['phone'] = this.phone;
    data['remarks'] = this.remarks;
    data['id'] = this.id;
    data['uid'] = this.uid;
    data['platform'] = this.platform;
    data['online'] = this.online;
    data['update_at'] = this.updateAt;
    data['last_activity'] = this.lastActivity;
    data['create_at'] = this.createAt;
    return data;
  }
}