blob: 0f34d4480faf4e176b5927b2d3269a6aee840200 (
plain) (
tree)
|
|
export class User {
id: string;
username: string;
role: string;
constructor(hash: { id: string, username: string, role: string }) {
this.id = hash.id;
this.username = hash.username;
this.role = hash.role;
}
isAdmin() {
return this.role === 'admin';
}
}
|