-- Domain-Preisliste: Einkaufspreise je Endung und Staffel, Verkaufspreis = Einkauf + Gewinnaufschlag CREATE TABLE domain_tlds ( tld VARCHAR(63) PRIMARY KEY, term_months INT NOT NULL DEFAULT 12, cost1_cents INT NOT NULL, cost2_cents INT NOT NULL, cost3_cents INT NOT NULL, cost4_cents INT NOT NULL, setup_cents INT NOT NULL DEFAULT 0, margin_type ENUM('percent','fixed') NULL, -- NULL = globalen Aufschlag verwenden margin_value INT NULL, -- percent: Basispunkte (2500 = 25 %), fixed: Cent active TINYINT(1) NOT NULL DEFAULT 1, updated_at DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; CREATE TABLE domain_settings ( id TINYINT PRIMARY KEY, tier TINYINT NOT NULL DEFAULT 1, -- Preisstaffel des Einkaufs (1 = 0-49, 2 = 50-199, 3 = 200-999, 4 = 1000+) margin_type ENUM('percent','fixed') NULL, margin_value INT NULL, updated_at DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; INSERT INTO domain_settings (id, tier) VALUES (1, 1);