

-------------------------------------------------------------------------------
--  task log
-------------------------------------------------------------------------------
CREATE TABLE TASK_LOG(
	ID BIGINT NOT NULL,

	EVENT_TYPE VARCHAR(100),
	EVENT_TIME DATETIME,
	CREATOR VARCHAR(64),
	START_OWNER VARCHAR(64),
	END_OWNER VARCHAR(64),
	TASK_STATUS VARCHAR(50),
	CONTENT VARCHAR(65535),
	PRIORITY INT,

	TASK_ID BIGINT,

        CONSTRAINT PK_TASK_LOG PRIMARY KEY(ID),
	CONSTRAINT FK_TASK_LOG_TASK  FOREIGN KEY(TASK_ID) REFERENCES TASK_INFO(ID)
);

COMMENT ON TABLE TASK_LOG IS '任务日志';
COMMENT ON COLUMN TASK_LOG.ID IS '主键';
COMMENT ON COLUMN TASK_LOG.EVENT_TYPE IS '事件类型';
COMMENT ON COLUMN TASK_LOG.EVENT_TIME IS '事件事件';
COMMENT ON COLUMN TASK_LOG.CREATOR IS '操作人';
COMMENT ON COLUMN TASK_LOG.START_OWNER IS '操作之前的负责人';
COMMENT ON COLUMN TASK_LOG.END_OWNER IS '操作之后的负责人';
COMMENT ON COLUMN TASK_LOG.TASK_STATUS IS '任务状态';
COMMENT ON COLUMN TASK_LOG.CONTENT IS '内容';
COMMENT ON COLUMN TASK_LOG.PRIORITY IS '排序';
COMMENT ON COLUMN TASK_LOG.TASK_ID IS '外键，任务';


