Aggiunto supporto per i nuovi utenti
This commit is contained in:
parent
efbf2e4084
commit
33b50bca4e
1 changed files with 23 additions and 0 deletions
23
src/types/IAUser.ts
Normal file
23
src/types/IAUser.ts
Normal file
|
@ -0,0 +1,23 @@
|
|||
import { IALanguage } from "./IALanguage"
|
||||
|
||||
export class IAUser {
|
||||
id: string;
|
||||
username: string;
|
||||
permission: string[];
|
||||
credits: number;
|
||||
language: IALanguage;
|
||||
|
||||
constructor(options: { id: string, username: string, permissions: string[], credits: number, language: string }) {
|
||||
this.id = options.id;
|
||||
this.username = options.username;
|
||||
this.permission = options.permissions;
|
||||
this.credits = options.credits;
|
||||
switch (options.language) {
|
||||
case "en":
|
||||
this.language = IALanguage.EN;
|
||||
break;
|
||||
default:
|
||||
this.language = IALanguage.EN;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue