44 lines
1 KiB
TypeScript
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;
|
|
}
|