class User {
  final int id;
  final String login;
  final String pwdHash;
  
  User({
    required this.id,
    required this.login,
    required this.pwdHash,
  });
  
  Map<String, dynamic> toMap() {
    return {
      'id': id,
      'login': login,
    };
  }
  
  factory User.fromMap(Map<String, dynamic> map) {
    return User(
      id: map['id'],
      login: map['login'],
      pwdHash: map['pwd_hash'],
    );
  }
}