40 lines
717 B
Dart
40 lines
717 B
Dart
// ignore_for_file: prefer_const_constructors, prefer_const_literals_to_create_immutables, file_names
|
|
|
|
class User {
|
|
final int id;
|
|
final String username;
|
|
final String password;
|
|
final String schoolCode;
|
|
|
|
getId() {
|
|
return id;
|
|
}
|
|
|
|
getUsername() {
|
|
return username;
|
|
}
|
|
|
|
getPassword() {
|
|
return password;
|
|
}
|
|
|
|
getSchoolCode() {
|
|
return schoolCode;
|
|
}
|
|
|
|
User(
|
|
{required this.id,
|
|
required this.username,
|
|
required this.password,
|
|
required this.schoolCode});
|
|
|
|
factory User.fromJson(Map<String, dynamic> json) {
|
|
return User(
|
|
id: json['id'],
|
|
username: json['username'],
|
|
password: json['password'],
|
|
schoolCode: json['schoolCode'],
|
|
);
|
|
}
|
|
}
|