CREATE TABLE IF NOT EXISTS tax_configs (
    id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
    company_npwp VARCHAR(32) NOT NULL,
    branch_code VARCHAR(32) NOT NULL,
    nitku VARCHAR(32) NOT NULL DEFAULT '',
    is_vat_centralized TINYINT(1) NOT NULL DEFAULT 0,
    p12_certificate LONGTEXT NULL,
    p12_passphrase VARCHAR(1024) NULL,
    flags_json TEXT NULL,
    created_at DATETIME NOT NULL,
    updated_at DATETIME NOT NULL,
    PRIMARY KEY (id),
    UNIQUE KEY uk_tax_configs_company_branch (company_npwp, branch_code),
    KEY idx_tax_configs_nitku (nitku)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

