Initial commit of CK-QR Platform

This commit is contained in:
Mohan Ki
2026-07-27 13:42:18 +05:30
commit 60dcb029dc
19 changed files with 2582 additions and 0 deletions
@@ -0,0 +1,9 @@
CREATE TABLE IF NOT EXISTS qr_scans (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
qr_code_id UUID REFERENCES qr_codes(id) ON DELETE CASCADE,
ip_address VARCHAR(45),
user_agent TEXT,
os VARCHAR(100),
device_type VARCHAR(50),
scanned_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP
);
+15
View File
@@ -0,0 +1,15 @@
CREATE TABLE IF NOT EXISTS app_settings (
key VARCHAR(100) PRIMARY KEY,
value TEXT,
category VARCHAR(50),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP
);
-- Insert some default keys so they show up in the UI
INSERT INTO app_settings (key, value, category) VALUES
('icici_merchant_id', '', 'payments'),
('icici_api_key', '', 'payments'),
('google_safe_browsing_key', '', 'security'),
('google_client_id', '', 'auth'),
('apple_service_id', '', 'auth')
ON CONFLICT (key) DO NOTHING;
+3
View File
@@ -0,0 +1,3 @@
INSERT INTO users (email, password_hash, role)
VALUES ('admin@ckqr.com', '$2b$10$ezY4oBvmZUc667XCKbl98.hKicJbOG9yaV9lFbZXwbeXWgMuN7L/6', 'enterprise')
ON CONFLICT (email) DO NOTHING;