Merge branch 'feature/lic-04-lizenz-modul-verwaltungsoberflaeche' into feature/qa-09-barrierefreiheits-audit

# Conflicts:
#	DEVLOG.md
#	go.mod
#	go.sum
#	internal/flag/flag.go
#	scripts/reset-test-env.sh
This commit is contained in:
sysops
2026-08-29 09:59:50 +02:00
23 changed files with 1816 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
DROP TABLE IF EXISTS tenant_licenses;
+12
View File
@@ -0,0 +1,12 @@
-- Lizenzumfang pro Mandant (LIC-01, siehe core-kanban/tickets/LIC-01.md).
-- Genau ein Lizenzdatensatz pro Tenant (tenant_id PK) — ein neues Einspielen
-- ersetzt den vorherigen Datensatz vollstaendig statt eine Historie zu fuehren.
CREATE TABLE tenant_licenses (
tenant_id UUID PRIMARY KEY REFERENCES tenants(id),
plan TEXT NOT NULL,
modules TEXT[] NOT NULL,
issued_at TIMESTAMPTZ NOT NULL,
valid_until TIMESTAMPTZ NOT NULL,
raw_key TEXT NOT NULL,
installed_at TIMESTAMPTZ NOT NULL DEFAULT now()
);
+2
View File
@@ -0,0 +1,2 @@
DROP TABLE IF EXISTS usage_quotas;
DROP TABLE IF EXISTS usage_counters;
+15
View File
@@ -0,0 +1,15 @@
-- Nutzungszaehler & Quotas je Tenant (LIC-03, siehe core-kanban/tickets/LIC-03.md).
CREATE TABLE usage_counters (
tenant_id UUID NOT NULL,
metric TEXT NOT NULL,
value BIGINT NOT NULL DEFAULT 0,
updated_at TIMESTAMPTZ NOT NULL DEFAULT now(),
PRIMARY KEY (tenant_id, metric)
);
CREATE TABLE usage_quotas (
tenant_id UUID NOT NULL,
metric TEXT NOT NULL,
limit_value BIGINT NOT NULL,
PRIMARY KEY (tenant_id, metric)
);