

-------------------------------------------------------------------------------
--  humantask
-------------------------------------------------------------------------------
CREATE TABLE HT_HUMANTASK(
	ID BIGINT NOT NULL,
	NAME VARCHAR(200),
	DESCRIPTION VARCHAR(200),
	ASSIGNEE VARCHAR(64),
	OWNER VARCHAR(64),
	DELEGATE_STATUS VARCHAR(50),
	PRIORITY INT,
	CREATE_TIME DATETIME,
	DURATION VARCHAR(50),
	SUSPEND_STATUS VARCHAR(50),
	CATEGORY VARCHAR(50),
	CODE VARCHAR(200),
	FORM VARCHAR(200),
	TASK_ID VARCHAR(200),
	EXECUTION_ID VARCHAR(200),
	PROCESS_INSTANCE_ID VARCHAR(200),
	PROCESS_DEFINITION_ID VARCHAR(200),
	TENENT_ID VARCHAR(64),
	PARENT_ID BIGINT,
	STATUS VARCHAR(50),
	COMPLETE_TIME DATETIME,
        CONSTRAINT PK_HT_HUMANTASK PRIMARY KEY(ID),
	CONSTRAINT FK_HT_HUMANTASK_PARENT FOREIGN KEY(PARENT_ID) REFERENCES HT_HUMANTASK(ID)
);

COMMENT ON TABLE HT_HUMANTASK IS '人工任务';
COMMENT ON COLUMN HT_HUMANTASK.ID IS '主键';
COMMENT ON COLUMN HT_HUMANTASK.NAME IS '任务名称';
COMMENT ON COLUMN HT_HUMANTASK.DESCRIPTION IS '任务描述';
COMMENT ON COLUMN HT_HUMANTASK.ASSIGNEE IS '负责人';
COMMENT ON COLUMN HT_HUMANTASK.OWNER IS '被代理人';
COMMENT ON COLUMN HT_HUMANTASK.DELEGATE_STATUS IS '代理状态';
COMMENT ON COLUMN HT_HUMANTASK.PRIORITY IS '优先级';
COMMENT ON COLUMN HT_HUMANTASK.CREATE_TIME IS '创建时间';
COMMENT ON COLUMN HT_HUMANTASK.DURATION IS '持续时间';
COMMENT ON COLUMN HT_HUMANTASK.SUSPEND_STATUS IS '暂停状态';
COMMENT ON COLUMN HT_HUMANTASK.CATEGORY IS '分类';
COMMENT ON COLUMN HT_HUMANTASK.CODE IS '代码';
COMMENT ON COLUMN HT_HUMANTASK.FORM IS '表单';
COMMENT ON COLUMN HT_HUMANTASK.TASK_ID IS '关联的任务ID';
COMMENT ON COLUMN HT_HUMANTASK.EXECUTION_ID IS '关联的分支ID';
COMMENT ON COLUMN HT_HUMANTASK.PROCESS_INSTANCE_ID IS '关联的流程实例ID';
COMMENT ON COLUMN HT_HUMANTASK.PROCESS_DEFINITION_ID IS '关联的流程定义ID';
COMMENT ON COLUMN HT_HUMANTASK.TENENT_ID IS '多租户';
COMMENT ON COLUMN HT_HUMANTASK.PARENT_ID IS '外键，父任务';
COMMENT ON COLUMN HT_HUMANTASK.STATUS IS '状态';
COMMENT ON COLUMN HT_HUMANTASK.COMPLETE_TIME IS '完成时间';





