class TalkModel {
  String avatarUrl;
  String cmd;
  int fromUser;
  String msg;
  String name;
  int online;
  String sessionid;
  int time;
  int type;

  TalkModel(
      {this.avatarUrl,
      this.cmd,
      this.fromUser,
      this.msg,
      this.name,
      this.online,
      this.sessionid,
      this.time,
      this.type});

  TalkModel.fromJson(Map<String, dynamic> json) {
    avatarUrl = json['avatarUrl'];
    cmd = json['cmd'];
    fromUser = json['fromUser'];
    msg = json['msg'];
    name = json['name'];
    online = json['online'];
    sessionid = json['sessionid'];
    time = json['time'];
    type = json['type'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['avatarUrl'] = this.avatarUrl;
    data['cmd'] = this.cmd;
    data['fromUser'] = this.fromUser;
    data['msg'] = this.msg;
    data['name'] = this.name;
    data['online'] = this.online;
    data['sessionid'] = this.sessionid;
    data['time'] = this.time;
    data['type'] = this.type;
    return data;
  }
}