

-------------------------------------------------------------------------------
--  doc dispatch
-------------------------------------------------------------------------------
CREATE TABLE DOC_DISPATCH(
    ID BIGINT NOT NULL,
    CODE VARCHAR(100),
    USER_ID VARCHAR(64),
    DEPT_CODE VARCHAR(50),
    DEPT_NAME VARCHAR(200),
    CREATE_TIME DATETIME,
    STATUS VARCHAR(50),
    DESCRIPTION VARCHAR(200),
    TENANT_ID VARCHAR(64),

    TITLE VARCHAR(50),
    DISPATCH_DATE DATE,
    SCOPE VARCHAR(200),
    CONTENT VARCHAR(200),
    ATTACHMENT VARCHAR(100),

    CONSTRAINT PK_DOC_DISPATCH PRIMARY KEY(ID)
);

COMMENT ON TABLE DOC_DISPATCH IS '发文';
COMMENT ON COLUMN DOC_DISPATCH.ID IS '主键';
COMMENT ON COLUMN DOC_DISPATCH.CODE IS '单号';
COMMENT ON COLUMN DOC_DISPATCH.USER_ID IS '申请人';
COMMENT ON COLUMN DOC_DISPATCH.DEPT_CODE IS '申请人部门编码';
COMMENT ON COLUMN DOC_DISPATCH.DEPT_NAME IS '申请人部门名称';
COMMENT ON COLUMN DOC_DISPATCH.CREATE_TIME IS '创建时间';
COMMENT ON COLUMN DOC_DISPATCH.STATUS IS '状态';
COMMENT ON COLUMN DOC_DISPATCH.DESCRIPTION IS '申请原因';
COMMENT ON COLUMN DOC_DISPATCH.TENANT_ID IS '多租户';

COMMENT ON COLUMN DOC_DISPATCH.TITLE IS '标题';
COMMENT ON COLUMN DOC_DISPATCH.DISPATCH_DATE IS '发布时间';
COMMENT ON COLUMN DOC_DISPATCH.SCOPE IS '发布范围';
COMMENT ON COLUMN DOC_DISPATCH.CONTENT IS '内容';
COMMENT ON COLUMN DOC_DISPATCH.ATTACHMENT IS '附件';


