From 33b50bca4e6c65d590c01630442389cf5ae07682 Mon Sep 17 00:00:00 2001 From: KillerBossOriginal Date: Wed, 3 Jul 2024 16:38:33 +0200 Subject: [PATCH] Aggiunto supporto per i nuovi utenti --- src/types/IAUser.ts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/types/IAUser.ts 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