

-------------------------------------------------------------------------------
--  travel info
-------------------------------------------------------------------------------
CREATE TABLE TRAVEL_INFO(
    ID BIGINT NOT NULL,
    CODE VARCHAR(100),
    TYPE VARCHAR(200),
    USER_ID VARCHAR(64),
    DEPT_CODE VARCHAR(50),
    DEPT_NAME VARCHAR(50),
    CREATE_TIME DATETIME,
    STATUS VARCHAR(50),
    PROJECT VARCHAR(50),
    DESCRIPTION VARCHAR(200),
    TENANT_ID VARCHAR(64),

    TRAVELLER VARCHAR(64),
    COST_CENTER_COMPANY VARCHAR(50),
    COST_CENTER_DEPARTMENT VARCHAR(50),
    START_DATE DATETIME,
    END_DATE DATETIME,
    DAY INT,
    PEER VARCHAR(200),
    COST INT,
    CONSTRAINT PK_TRAVEL_INFO PRIMARY KEY(ID)
);

COMMENT ON TABLE TRAVEL_INFO IS '差旅信息';
COMMENT ON COLUMN TRAVEL_INFO.ID IS '主键';
COMMENT ON COLUMN TRAVEL_INFO.CODE IS '单号';
COMMENT ON COLUMN TRAVEL_INFO.TYPE IS '类型';
COMMENT ON COLUMN TRAVEL_INFO.USER_ID IS '申请人';
COMMENT ON COLUMN TRAVEL_INFO.DEPT_CODE IS '申请人部门编码';
COMMENT ON COLUMN TRAVEL_INFO.DEPT_NAME IS '申请人部门名称';
COMMENT ON COLUMN TRAVEL_INFO.CREATE_TIME IS '创建时间';
COMMENT ON COLUMN TRAVEL_INFO.STATUS IS '状态';
COMMENT ON COLUMN TRAVEL_INFO.PROJECT IS '项目';
COMMENT ON COLUMN TRAVEL_INFO.DESCRIPTION IS '申请原因';
COMMENT ON COLUMN TRAVEL_INFO.TENANT_ID IS '多租户';

COMMENT ON COLUMN TRAVEL_INFO.TRAVELLER IS '出差人';
COMMENT ON COLUMN TRAVEL_INFO.COST_CENTER_COMPANY IS '成本中心公司';
COMMENT ON COLUMN TRAVEL_INFO.COST_CENTER_DEPARTMENT IS '成本中心部门';
COMMENT ON COLUMN TRAVEL_INFO.START_DATE IS '开始时间';
COMMENT ON COLUMN TRAVEL_INFO.END_DATE IS '结束时间';
COMMENT ON COLUMN TRAVEL_INFO.DAY IS '天数';
COMMENT ON COLUMN TRAVEL_INFO.PEER IS '同行人';
COMMENT ON COLUMN TRAVEL_INFO.COST IS '成本预估';

