

-------------------------------------------------------------------------------
--  leave request
-------------------------------------------------------------------------------
CREATE TABLE LEAVE_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),

    TYPE VARCHAR(100),
    START_TIME DATE,
    END_TIME DATE,
    DAY INT,
    HAND_OVER_PERSON VARCHAR(200),

    CONSTRAINT PK_LEAVE_REQUEST PRIMARY KEY(ID)
);

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

COMMENT ON COLUMN LEAVE_REQUEST.TYPE IS '请假类型';
COMMENT ON COLUMN LEAVE_REQUEST.START_TIME IS '开始时间';
COMMENT ON COLUMN LEAVE_REQUEST.END_TIME IS '结束时间';
COMMENT ON COLUMN LEAVE_REQUEST.DAY IS '天数';
COMMENT ON COLUMN LEAVE_REQUEST.HAND_OVER_PERSON IS '交接人';


