part of models;

/// members_id : 1
/// name : "555555"
/// password : "637641045c830d80190da7b94f69c2cd"
/// head_img : "http://192.168.11.67:9090/static/images/20210820182011.png"
/// sex : 1
/// birthday : "2020-01-01"
/// phone : "13532236565"
/// grade_id : 1
/// badge_id : 1
/// token : "e8410f5092b809a80956b5f01de75035"
/// access_token : "members_access_token:be48312274defc9ee894c088b7a3be74"
/// grade_name : "等级1"

class UserModel {
  UserModel({
      this.membersId, 
      this.name, 
      this.password, 
      this.headImg, 
      this.sex, 
      this.birthday, 
      this.phone, 
      this.gradeId, 
      this.badgeId, 
      this.token, 
      this.accessToken, 
      this.gradeName,});

  num? membersId;
  String? name;
  String? password;
  String? headImg;
  num? sex;
  String? birthday;
  String? phone;
  num? gradeId;
  num? badgeId;
  String? token;
  String? accessToken;
  String? gradeName;

  UserModel.fromJson(dynamic json) {
    membersId = json['members_id'];
    name = json['name'];
    password = json['password'];
    headImg = json['head_img'];
    sex = json['sex'];
    birthday = json['birthday'];
    phone = json['phone'];
    gradeId = json['grade_id'];
    badgeId = json['badge_id'];
    token = json['token'];
    accessToken = json['access_token'];
    gradeName = json['grade_name'];
  }

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['members_id'] = membersId;
    map['name'] = name;
    map['password'] = password;
    map['head_img'] = headImg;
    map['sex'] = sex;
    map['birthday'] = birthday;
    map['phone'] = phone;
    map['grade_id'] = gradeId;
    map['badge_id'] = badgeId;
    map['token'] = token;
    map['access_token'] = accessToken;
    map['grade_name'] = gradeName;
    return map;
  }

}