

-------------------------------------------------------------------------------
--  task def deadline
-------------------------------------------------------------------------------
CREATE TABLE TASK_DEF_DEADLINE(
	ID BIGINT NOT NULL,
	TYPE VARCHAR(50),
	DURATION VARCHAR(100),
	STATUS VARCHAR(50),
	ESCALATION_TYPE VARCHAR(50),
	NOTIFICATION_CONDITION VARCHAR(200),
	NOTIFICATION_TYPE VARCHAR(200),
	NOTIFICATION_RECEIVER VARCHAR(200),
	NOTIFICATION_TEMPLATE_CODE VARCHAR(200),
	REASSGINMENT VARCHAR(200),
	OPERATION VARCHAR(200),
	BASE_ID BIGINT,
        CONSTRAINT PK_TASK_DEF_DEADLINE PRIMARY KEY(ID),
        CONSTRAINT FK_TASK_DEF_DEADLINE_BASE FOREIGN KEY(BASE_ID) REFERENCES TASK_DEF_BASE(ID)
);

COMMENT ON TABLE TASK_DEF_DEADLINE IS '任务定义截止时间';
COMMENT ON COLUMN TASK_DEF_DEADLINE.ID IS '主键';
COMMENT ON COLUMN TASK_DEF_DEADLINE.TYPE IS '分类';
COMMENT ON COLUMN TASK_DEF_DEADLINE.DURATION IS '持续时间';
COMMENT ON COLUMN TASK_DEF_DEADLINE.STATUS IS '状态';
COMMENT ON COLUMN TASK_DEF_DEADLINE.ESCALATION_TYPE IS '升级类型';
COMMENT ON COLUMN TASK_DEF_DEADLINE.NOTIFICATION_CONDITION IS '提醒条件';
COMMENT ON COLUMN TASK_DEF_DEADLINE.NOTIFICATION_TYPE IS '提醒类型';
COMMENT ON COLUMN TASK_DEF_DEADLINE.NOTIFICATION_RECEIVER IS '提醒接收人';
COMMENT ON COLUMN TASK_DEF_DEADLINE.NOTIFICATION_TEMPLATE_CODE IS '提醒模板编号';
COMMENT ON COLUMN TASK_DEF_DEADLINE.REASSGINMENT IS '重分配';
COMMENT ON COLUMN TASK_DEF_DEADLINE.OPERATION IS '操作';
COMMENT ON COLUMN TASK_DEF_DEADLINE.BASE_ID IS '外键，任务定义';


