[FEAT] Documenti istituzionali dashboard: backend + mig 065 (ticket #499)
Card 'Documenti istituzionali' resa funzionale (era stato vuoto onesto). - mig 065: tabella institutional_documents (per-org, descrizione obbligatoria) - InstitutionalDocsController: list/save/delete (org-scoped, org_admin+compliance_manager) - 5 voci standard sempre presenti: Codice Etico, Mission, Vision, Statuto, Piano Sanzionatorio - registrato in index.php controllerMap/actionMap Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
ecb17e59f0
commit
1b65321ffb
@@ -0,0 +1,19 @@
|
||||
-- 065_institutional_documents.sql — Documenti istituzionali per-org (dashboard).
|
||||
-- Ticket #499 (Simon Fattori, super_admin): ad ogni documento una DESCRIZIONE obbligatoria
|
||||
-- inserita dall'utente + 5 voci standard sempre presenti (Codice Etico, Mission, Vision,
|
||||
-- Statuto, Piano Sanzionatorio). Additiva e idempotente.
|
||||
CREATE TABLE IF NOT EXISTS institutional_documents (
|
||||
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
|
||||
organization_id INT NOT NULL,
|
||||
doc_key VARCHAR(60) NULL, -- codice_etico|mission|vision|statuto|piano_sanzionatorio; NULL = voce custom
|
||||
title VARCHAR(200) NOT NULL,
|
||||
description TEXT NOT NULL, -- obbligatoria (richiesta punto 1 del ticket)
|
||||
file_url VARCHAR(500) NULL,
|
||||
is_standard TINYINT(1) NOT NULL DEFAULT 0,
|
||||
sort_order INT NOT NULL DEFAULT 0,
|
||||
created_by INT NULL,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
UNIQUE KEY uq_instdoc_org_key (organization_id, doc_key),
|
||||
INDEX idx_instdoc_org (organization_id)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
Reference in New Issue
Block a user