-- 服务商多业务凭证配置表
CREATE TABLE IF NOT EXISTS pay_service_provider_profile (
    id                  BIGSERIAL PRIMARY KEY,
    service_provider_id BIGINT NOT NULL,
    biz_type            VARCHAR(32) NOT NULL,
    app_id              VARCHAR(64),
    app_private_key     TEXT,
    alipay_public_key   TEXT,
    server_url          VARCHAR(256),
    format              VARCHAR(16)  DEFAULT 'JSON',
    charset             VARCHAR(16)  DEFAULT 'UTF-8',
    sign_type           VARCHAR(16)  DEFAULT 'RSA2',
    description         VARCHAR(512),
    created_time        TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    updated_time        TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    UNIQUE(service_provider_id, biz_type)
);
