First version of the security module

This commit is contained in:
2026-06-22 13:19:05 +02:00
parent 0392043ee3
commit 498afc7840
64 changed files with 7581 additions and 4 deletions

View File

@@ -0,0 +1,19 @@
-- Security module: per-product check templates (the curated product catalog).
-- Each template carries the dynamic technical checklist for one software product.
-- Tenant-scoped; BC is not involved (the template catalog IS the product list).
CREATE TABLE IF NOT EXISTS `security_check_templates` (
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
`tenant_id` INT UNSIGNED NOT NULL,
`product_code` VARCHAR(60) NOT NULL,
`product_name` VARCHAR(255) NOT NULL DEFAULT '',
`tech_schema_json` TEXT NULL DEFAULT NULL,
`active` TINYINT(1) NOT NULL DEFAULT 1,
`version` INT UNSIGNED NOT NULL DEFAULT 1,
`created_by` INT UNSIGNED NULL DEFAULT NULL,
`updated_by` INT UNSIGNED NULL DEFAULT NULL,
`created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` DATETIME NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `uniq_sct_tenant_code` (`tenant_id`, `product_code`),
KEY `idx_sct_tenant_active` (`tenant_id`, `active`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;