-- FuturisticREPO - Seed Data
-- License Tiers, Compliance Thresholds for all industries
-- DBAOps Futuristic Enterprise™
USE [FuturisticREPO];
GO

-- License Tiers
DELETE FROM license.LicenseTiers;
SET IDENTITY_INSERT license.LicenseTiers ON;
INSERT INTO license.LicenseTiers (TierID, TierCode, TierName, MaxServers, MaxComputers, DurationMonths, PriceUSD, IndustryCode, IsActive) VALUES
(1, 'COMMUNITY', 'Community', 1, 1, NULL, 0, NULL, 1),
(2, 'TRIAL', 'Trial (Full Access)', NULL, NULL, 3, 0, NULL, 1),
(3, 'HEALTHCARE', 'Healthcare (HIPAA)', NULL, NULL, 12, NULL, 'HEALTHCARE', 1),
(4, 'BANKING', 'Banking (PCI)', NULL, NULL, 12, NULL, 'BANKING', 1),
(5, 'LAW_ENFORCEMENT', 'Law Enforcement (CJIS)', NULL, NULL, 12, NULL, 'LAW_ENFORCEMENT', 1),
(6, 'DOD', 'DoD (STIG/DISA)', NULL, NULL, 12, NULL, 'DOD', 1),
(7, 'ENTERPRISE', 'Enterprise (All Frameworks)', NULL, NULL, 12, NULL, NULL, 1);
SET IDENTITY_INSERT license.LicenseTiers OFF;
GO

-- Compliance Thresholds - All Industries
DELETE FROM config.ComplianceThresholds;
INSERT INTO config.ComplianceThresholds (IndustryCode, MetricCode, WarningValue, CriticalValue, ComparisonType, ComplianceStandard, IsRequired) VALUES
-- Healthcare (HIPAA)
('HEALTHCARE','TDE_REQUIRED',1,1,'EQUAL','HIPAA 164.312(a)(2)(iv)',1),
('HEALTHCARE','BACKUP_FULL_HOURS',24,48,'ABOVE','HIPAA',1),
('HEALTHCARE','BACKUP_LOG_HOURS',1,4,'ABOVE','HIPAA',1),
('HEALTHCARE','SA_DISABLED',1,1,'EQUAL','HIPAA',1),
('HEALTHCARE','XP_CMDSHELL',0,0,'EQUAL','HIPAA',1),
('HEALTHCARE','DISK_FREE_PCT',25,15,'BELOW','HIPAA',1),
-- Banking (PCI DSS)
('BANKING','TDE_REQUIRED',1,1,'EQUAL','PCI DSS 3.4',1),
('BANKING','BACKUP_FULL_HOURS',24,48,'ABOVE','PCI DSS',1),
('BANKING','BACKUP_LOG_HOURS',1,4,'ABOVE','PCI DSS',1),
('BANKING','SA_DISABLED',1,1,'EQUAL','PCI DSS 2.2.5',1),
('BANKING','XP_CMDSHELL',0,0,'EQUAL','PCI DSS',1),
('BANKING','DISK_FREE_PCT',25,15,'BELOW','PCI DSS',1),
-- Law Enforcement (CJIS)
('LAW_ENFORCEMENT','TDE_REQUIRED',1,1,'EQUAL','CJIS 5.10',1),
('LAW_ENFORCEMENT','BACKUP_FULL_HOURS',24,48,'ABOVE','CJIS 5.4.1.1',1),
('LAW_ENFORCEMENT','BACKUP_LOG_HOURS',1,4,'ABOVE','CJIS 5.4.1.1',1),
('LAW_ENFORCEMENT','SA_DISABLED',1,1,'EQUAL','CJIS 5.6',1),
('LAW_ENFORCEMENT','XP_CMDSHELL',0,0,'EQUAL','CJIS',1),
('LAW_ENFORCEMENT','DISK_FREE_PCT',25,15,'BELOW','CJIS',1),
-- DoD (STIG/DISA)
('DOD','TDE_REQUIRED',1,1,'EQUAL','DISA STIG',1),
('DOD','BACKUP_FULL_HOURS',24,48,'ABOVE','DISA STIG',1),
('DOD','BACKUP_LOG_HOURS',1,4,'ABOVE','DISA STIG',1),
('DOD','SA_DISABLED',1,1,'EQUAL','DISA STIG V-41419',1),
('DOD','XP_CMDSHELL',0,0,'EQUAL','DISA STIG V-41420',1),
('DOD','DISK_FREE_PCT',25,15,'BELOW','NIST 800-53',1),
-- Default (Community/General)
('DEFAULT','BACKUP_FULL_HOURS',96,168,'ABOVE','Best Practice',0),
('DEFAULT','BACKUP_LOG_HOURS',4,12,'ABOVE','Best Practice',0),
('DEFAULT','SA_DISABLED',1,1,'EQUAL','Best Practice',1),
('DEFAULT','XP_CMDSHELL',0,0,'EQUAL','Best Practice',1),
('DEFAULT','DISK_FREE_PCT',15,10,'BELOW','Best Practice',0);
GO
