Base user workflow (create/update)

This commit is contained in:
Andrew 2023-04-12 03:03:48 +07:00
parent eb5d3e2b70
commit 45be2c80ff
8 changed files with 528 additions and 17 deletions

View file

@ -0,0 +1,27 @@
class UserModel {
final int id;
final String username;
final String? password;
final String? accessToken;
UserModel({
required this.id,
required this.username,
this.password,
this.accessToken,
});
factory UserModel.fromJson(Map<String, dynamic> json) => UserModel(
id: json["id"],
username: json["username"],
password: json["password"],
accessToken: json["access_token"],
);
Map<String, dynamic> toJson() => {
"id": id,
"username": username,
"password": password,
"access_token": accessToken,
};
}