

-------------------------------------------------------------------------------
--  travel request
-------------------------------------------------------------------------------
CREATE TABLE TRAVEL_REQUEST(
    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),

    VEHICLE VARCHAR(100),
    TYPE VARCHAR(100),
    START_CITY VARCHAR(50),
    END_CITY VARCHAR(50),
    START_DATE DATE,
    END_DATE DATE,
    DAY INT,
    PEER VARCHAR(200),

    CONSTRAINT PK_TRAVEL_REQUEST PRIMARY KEY(ID)
);

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

COMMENT ON COLUMN TRAVEL_REQUEST.VEHICLE IS '交通工具';
COMMENT ON COLUMN TRAVEL_REQUEST.TYPE IS '单程往返';
COMMENT ON COLUMN TRAVEL_REQUEST.START_CITY IS '出发城市';
COMMENT ON COLUMN TRAVEL_REQUEST.END_CITY IS '目的城市';
COMMENT ON COLUMN TRAVEL_REQUEST.START_DATE IS '开始时间';
COMMENT ON COLUMN TRAVEL_REQUEST.END_DATE IS '结束时间';
COMMENT ON COLUMN TRAVEL_REQUEST.DAY IS '天数';
COMMENT ON COLUMN TRAVEL_REQUEST.PEER IS '同行人';


