CREATE TABLE IF NOT EXISTS bse_mtrl_hs_prps (
    id BIGINT PRIMARY KEY,
    INF_ID BIGINT NOT NULL,
    PRPS_ID BIGINT NOT NULL,
    UNT_ID BIGINT,
    VAL VARCHAR(255),
    IS_KY INT,
    IS_MTNG INT,
    SRT BIGINT,
    creator VARCHAR(64) DEFAULT '',
    create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
    updater VARCHAR(64) DEFAULT '',
    update_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
    deleted BIT DEFAULT FALSE NOT NULL,
    tenant_id BIGINT DEFAULT 1 NOT NULL
);

CREATE TABLE IF NOT EXISTS bse_mtrl_grade_ext (
    id BIGINT PRIMARY KEY,
    CMP_CD VARCHAR(64) NOT NULL,
    CMP_NM VARCHAR(128),
    MTRL_CD VARCHAR(128) NOT NULL,
    MTRL_NM VARCHAR(255),
    ZH_BRAND VARCHAR(255),
    EN_BRAND VARCHAR(255),
    SPC_MDL VARCHAR(255),
    LINE_TP VARCHAR(64),
    PKG VARCHAR(255),
    company_id BIGINT,
    company_name VARCHAR(128),
    dept_id BIGINT,
    dept_name VARCHAR(128),
    post_id BIGINT,
    tenant_id BIGINT DEFAULT 1,
    creator_name VARCHAR(64),
    updater_name VARCHAR(64),
    creator VARCHAR(64),
    create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
    updater VARCHAR(64),
    update_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
    deleted BIT DEFAULT FALSE NOT NULL
);
