-- schema.sql - acquire-core-full 공통 스키마 루트
-- 모듈별 원장 테이블은 db/<mod>_*.sql 참조.

CREATE TABLE IF NOT EXISTS merchant (
    merch_id   VARCHAR(15) NOT NULL,
    merch_name VARCHAR(60) NOT NULL,
    biz_no     VARCHAR(12),
    status     CHAR(1)     NOT NULL DEFAULT 'A',
    CONSTRAINT pk_merchant PRIMARY KEY (merch_id)
);

CREATE TABLE IF NOT EXISTS approval (
    appr_no   VARCHAR(9)  NOT NULL,
    merch_id  VARCHAR(15) NOT NULL,
    amount    BIGINT      NOT NULL,
    appr_date CHAR(8)     NOT NULL,
    status    CHAR(1)     NOT NULL DEFAULT 'A',
    CONSTRAINT pk_approval PRIMARY KEY (appr_no)
);
