CREATE TABLE IF NOT EXISTS CONTINEW_ZHICHAO.ILCPT_BLACK_LIST (
    id                BIGINT         IDENTITY(1,1),
    bl_type           varchar(20)    NOT NULL,
    name              varchar(100)   NOT NULL,
    sub_title         varchar(100)   DEFAULT NULL,
    enterprise_name   varchar(100)   DEFAULT NULL,
    start_date        date           NOT NULL,
    end_date          date           NOT NULL,
    fence_id          BIGINT         DEFAULT NULL,
    fence_name        varchar(100)   DEFAULT NULL,
    reason            varchar(500)   DEFAULT NULL,
    bl_status         varchar(20)    NOT NULL DEFAULT 'active',
    create_user       BIGINT         DEFAULT NULL,
    create_time       datetime       DEFAULT NULL,
    update_user       BIGINT         DEFAULT NULL,
    update_time       datetime       DEFAULT NULL,
    deleted           BIGINT         NOT NULL DEFAULT 0,
    PRIMARY KEY (id)
);

CREATE INDEX idx_bl_type ON CONTINEW_ZHICHAO.ILCPT_BLACK_LIST (bl_type);
CREATE INDEX idx_bl_status ON CONTINEW_ZHICHAO.ILCPT_BLACK_LIST (bl_status);
CREATE INDEX idx_bl_deleted ON CONTINEW_ZHICHAO.ILCPT_BLACK_LIST (deleted);

COMMIT;
