

-------------------------------------------------------------------------------
--  doc incoming
-------------------------------------------------------------------------------
CREATE TABLE DOC_INCOMING(
    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),
    INCOMING_DATE DATE,
    SCOPE VARCHAR(200),
    CONTENT VARCHAR(200),
    ATTACHMENT VARCHAR(100),

    CONSTRAINT PK_DOC_INCOMING PRIMARY KEY(ID)
);

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

COMMENT ON COLUMN DOC_INCOMING.TITLE IS '标题';
COMMENT ON COLUMN DOC_INCOMING.INCOMING_DATE IS '接收时间';
COMMENT ON COLUMN DOC_INCOMING.SCOPE IS '发布范围';
COMMENT ON COLUMN DOC_INCOMING.CONTENT IS '内容';
COMMENT ON COLUMN DOC_INCOMING.ATTACHMENT IS '附件';


