/// Description:
/// Time       : 09/03/2023 Sunday
/// Author     : liuyuqi.gov@msn.cn
class UserModel {
  int id = 0;
  String name = "";
  int age = 18;
  String email = "";
  String password = "";
  String phone = "";
  String address = "";
  String avator = "";
  String token = "";
  String createdAt = "";

  UserModel({
    required this.id,
    required this.name,
    required this.age,
    required this.email,
    required this.password,
    required this.phone,
    required this.address,
    required this.avator,
    required this.token,
    required this.createdAt,
  });

  UserModel.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    name = json['name'];
    age = json['age'];
    email = json['email'];
    password = json['password'];
    phone = json['phone'];
    address = json['address'];
    avator = json['avator'];
    token = json['token'];
    createdAt = json['createdAt'];
  }

  Map<String, dynamic> toJson() {
    return {
      'id': id,
      'name': name,
      'age': age,
      'email': email,
      'password': password,
      'phone': phone,
      'address': address,
      'avator': avator,
      'token': token,
      'createdAt': createdAt,
    };
  }
}