INSERT INTO accounts (id, name, slug)
VALUES (1, 'Ninja Brokers Demo', 'ninja-brokers-demo')
ON DUPLICATE KEY UPDATE name = VALUES(name);

INSERT INTO plans (id, name, slug, site_limit, user_limit, property_limit, lead_limit)
VALUES (1, 'Pro', 'pro', 3, 10, 5000, 50000)
ON DUPLICATE KEY UPDATE
    name = VALUES(name),
    site_limit = VALUES(site_limit),
    user_limit = VALUES(user_limit),
    property_limit = VALUES(property_limit),
    lead_limit = VALUES(lead_limit);

-- Token puro para teste: demo-ninja-brokers-2026
-- SHA-256: SELECT SHA2('demo-ninja-brokers-2026', 256);
INSERT INTO licenses (id, account_id, plan_id, token_hash, token_preview, status)
VALUES (
    1,
    1,
    1,
    SHA2('demo-ninja-brokers-2026', 256),
    'demo-ninja...2026',
    'active'
)
ON DUPLICATE KEY UPDATE
    account_id = VALUES(account_id),
    plan_id = VALUES(plan_id),
    status = VALUES(status);

