esameits24-26backend/src/types/index.ts
AV77web 46f3fa6efc
All checks were successful
Deploy to VPS / build (push) Successful in 17s
Deploy to VPS / deploy (push) Successful in 18s
modifca e correzione ai commenti iniziali
2026-07-14 10:45:57 +02:00

44 lines
1 KiB
TypeScript

//==============================================
// File: index.ts
// Script con i tipi relativi alle varie entità
// @author: "villari.andrea@libero.it"
// @version: "1.0.0 2026-07-14"
//==============================================
import {
ASSEGNAZIONE_CONSTRAINTS,
UTENTE_CONSTRAINTS,
} from "../validation/constraints.js";
export type Ruolo = (typeof UTENTE_CONSTRAINTS.ruolo.allowedValues)[number];
export type StatoAssegnazione =
(typeof ASSEGNAZIONE_CONSTRAINTS.stato.allowedValues)[number];
export interface Utente {
UtenteID: number;
Nome: string;
Cognome: string;
Email: string;
PasswordHash: string;
Ruolo: Ruolo;
}
export interface Corso {
CorsoID: number;
Titolo: string;
Descrizione: string | null;
Categoria: string;
DurataOre: number;
Obbligatorio: boolean;
Attivo: boolean;
}
export interface AssegnazioneCorso {
AssegnazioneID: number;
CorsoID: number;
DipendenteID: number;
DataAssegnazione: Date;
DataScadenza: Date;
Stato: StatoAssegnazione;
DataCompletamento: Date | null;
}