-- ============================================================
-- Migration 011: Perks — B2B token purchase, individual products
-- ============================================================

ALTER TABLE partner_perks
  ADD COLUMN IF NOT EXISTS token_price DECIMAL(18,0) DEFAULT 0 AFTER discount_details;

-- Clear placeholder seed perks
DELETE FROM perk_claims;
DELETE FROM partner_perks;

-- ── Beezifi products ──────────────────────────────────────────────────────
INSERT INTO partner_perks (partner_name, partner_url, category, headline, description, token_price, is_exclusive, is_active, sort_order) VALUES
('Beezifi', 'https://workspace.beezifi.com',  'Beezifi',  'Workspace',  'Messaging, collaboration, and team productivity in one connected hub.', 500, TRUE, TRUE, 10),
('Beezifi', 'https://accounting.beezifi.com', 'Beezifi',  'Accounting', 'Financial management, invoicing, and reporting built for modern businesses.', 500, TRUE, TRUE, 11),
('Beezifi', 'https://crm.beezifi.com',        'Beezifi',  'CRM',        'Customer relationship management with AI-powered insights and automation.', 500, TRUE, TRUE, 12),
('Beezifi', 'https://grc.beezifi.com',        'Beezifi',  'GRC',        'Governance, risk, and compliance management with built-in audit trails.', 500, TRUE, TRUE, 13),
('Beezifi', 'https://dataroom.beezifi.com',   'Beezifi',  'DataRoom',   'Secure document storage and deal room for sensitive business data.', 500, TRUE, TRUE, 14),
('Beezifi', 'https://newswire.beezifi.com',   'Beezifi',  'Newswire',   'Self-serve press release publishing with public newsroom distribution.', 500, TRUE, TRUE, 15),
('Beezifi', 'https://iom.beezifi.com',        'Beezifi',  'IOM',        'Inventory and order management with warehouse execution and accounting sync.', 500, TRUE, TRUE, 16),
('Beezifi', 'https://storage.beezifi.com',    'Beezifi',  'Storage',    'Private S3-compatible object storage with no egress fees and full data sovereignty.', 500, TRUE, TRUE, 17),
('Beezifi', 'https://agreement.beezifi.com',  'Beezifi',  'Agreement',  'AI-powered e-signature and document workflow management at scale.', 500, TRUE, TRUE, 18),
('Beezifi', 'https://identity.beezifi.com',   'Beezifi',  'Identity',   'Complete identity and access management with SSO, MFA, and RBAC.', 500, TRUE, TRUE, 19),
('Beezifi', 'https://security.beezifi.com',   'Beezifi',  'Security',   'Cybersecurity and compliance infrastructure with threat monitoring and encryption.', 500, TRUE, TRUE, 20);

-- ── Torvali products ──────────────────────────────────────────────────────
INSERT INTO partner_perks (partner_name, partner_url, category, headline, description, token_price, is_exclusive, is_active, sort_order) VALUES
('Torvali', 'https://torvali.com/signup',     'Torvali',  'Online Store', 'A beautiful, fully-featured online store with drag-and-drop builder, payments, and analytics.', 500, TRUE, TRUE, 30),
('Torvali', 'https://torvali.com/marketplace','Torvali',  'Theme Marketplace', 'Browse and install themes crafted by independent designers with one-click application.', 500, TRUE, TRUE, 31),
('Torvali', 'https://torvali.com/designer',   'Torvali',  'Designer Program', 'Submit CSS themes and earn revenue from merchant installations — no hosting required.', 500, TRUE, TRUE, 32);

-- ── Companions by JozieAI ────────────────────────────────────────────────
INSERT INTO partner_perks (partner_name, partner_url, category, headline, description, token_price, is_exclusive, is_active, sort_order) VALUES
('Companions by JozieAI', 'https://companions.jozieai.com', 'AI Tools', 'Companions', 'AI-powered business assistants that automate customer interactions and support your team around the clock.', 500, TRUE, TRUE, 50);
