diff --git a/src/types/IAUser.ts b/src/types/IAUser.ts new file mode 100644 index 0000000..ee65d37 --- /dev/null +++ b/src/types/IAUser.ts @@ -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; + } + } +} \ No newline at end of file