From a68eae4828aaa8bc8473e749ebddeb772aaaa1b1 Mon Sep 17 00:00:00 2001 From: AV77web Date: Sun, 12 Jul 2026 17:25:07 +0200 Subject: [PATCH] modifica a 02_seed.sql con inserimento ruolo --- commit-push.bat | 15 +++++++++++++++ initdb/02_seed.sql | 20 +++++++++----------- 2 files changed, 24 insertions(+), 11 deletions(-) create mode 100644 commit-push.bat diff --git a/commit-push.bat b/commit-push.bat new file mode 100644 index 0000000..274ac42 --- /dev/null +++ b/commit-push.bat @@ -0,0 +1,15 @@ +@echo-off +cd /d D:\prenotazioni\esameits24-26\esameits24-26backend +git status +echo. +set /p MSG=Messaggio commit: +if "%MSG%"=="" ( + echo Messaggio obbligatorio. + exit /b 1 +) +git add . +git status +set /p OK="Procedere con commit e push?" (s/N): +if /i not "%OK%" == "s" exit /b 0 +git commit -m "%MSG%" +git push -u origin main \ No newline at end of file diff --git a/initdb/02_seed.sql b/initdb/02_seed.sql index 7368ab1..70d2b1b 100644 --- a/initdb/02_seed.sql +++ b/initdb/02_seed.sql @@ -1,18 +1,16 @@ -- ============================================================ -- Dati iniziali di test – esameits24-26 -- Password per tutti gli utenti: Password123! --- --- Operatori: --- 1 Andrea Villari – admin@centro.it (Admin) --- 2 Maria Bianchi – maria.bianchi@centro.it (operatore) --- +-- 1 Andrea Villari – admin@azienda.it (responsabile) +-- 2 Mario Rossi – mario.rossi@azienda.it (dipendente) +-- 3 Marco Bianchi – marco.bianchi@azienda.it (dipendente) +-- 4 Anna Verdi – anna.verdi@azienda.it (dipendente) -- ============================================================ USE `esameits24-26`; --- ------------------------------------------------------------ --- Utenti --- ------------------------------------------------------------ -INSERT INTO utenti (Nome, Cognome, Email, PasswordHash, Admin) VALUES - ('Andrea', 'Villari', 'admin@centro.it', '$2b$10$7Z80qZcDydZCdLrOcaH/VOa9knKWjQVyyg8MtEgBAvgfNMsiLEZze', TRUE), - ('Maria', 'Bianchi', 'maria.bianchi@centro.it', '$2b$10$7Z80qZcDydZCdLrOcaH/VOa9knKWjQVyyg8MtEgBAvgfNMsiLEZze', FALSE); +INSERT INTO utenti (nome, cognome, email, password_hash, ruolo) VALUES + ('Andrea', 'Villari', 'admin@azienda.it', '$2b$10$7Z80qZcDydZCdLrOcaH/VOa9knKWjQVyyg8MtEgBAvgfNMsiLEZze', 'RESPONSABILE_AMMINISTRATIVO'), + ('Mario', 'Rossi', 'mario.rossi@azienda.it', '$2b$10$7Z80qZcDydZCdLrOcaH/VOa9knKWjQVyyg8MtEgBAvgfNMsiLEZze', 'DIPENDENTE'), + ('Marco', 'Bianchi', 'marco.bianchi@azienda.it', '$2b$10$7Z80qZcDydZCdLrOcaH/VOa9knKWjQVyyg8MtEgBAvgfNMsiLEZze', 'DIPENDENTE'), + ('Anna', 'Verdi', 'anna.verdi@azienda.it', '$2b$10$7Z80qZcDydZCdLrOcaH/VOa9knKWjQVyyg8MtEgBAvgfNMsiLEZze', 'DIPENDENTE'); \ No newline at end of file