-- Seed example agent config for tenant 1 (adjust tenant_id and encrypt key for production)
-- Plain OpenRouter key works in dev when secret_key_encrypted has NO v1: prefix.
-- Use SecretDecryptionService.encryptForStorage() to produce v1: values for production.

USE db_abos_v0.1;

-- Verify table exists and columns match DimAgentConfig.java before running:
-- SHOW CREATE TABLE dim_agent_configs;

INSERT INTO dim_agent_configs (
    tenant_id,
    agent_code,
    system_prompt,
    secret_key_encrypted,
    is_active
) VALUES (
    1,
    'BANK_STATEMENT_EXTRACTOR',
    'Extract bank statement header fields and transaction rows from the uploaded PDF. Return structured JSON only.',
    'REPLACE_WITH_OPENROUTER_KEY_OR_v1_ENCRYPTED_VALUE',
    1
) ON DUPLICATE KEY UPDATE
    system_prompt = VALUES(system_prompt),
    secret_key_encrypted = VALUES(secret_key_encrypted),
    is_active = VALUES(is_active);
