
CREATE TABLE BPM_PROCESS(
	ID BIGINT NOT NULL,
	NAME VARCHAR(200),
	PROCESS_DEFINITION_KEY VARCHAR(200),
	PROCESS_DEFINITION_VERSION INTEGER,
	CATEGORY_ID BIGINT,
	PRIORITY INTEGER,
	DESCN VARCHAR(200),
	USE_TASK_CONF INTEGER,
        CONSTRAINT PK_BPM_PROCESS PRIMARY KEY(ID),
        CONSTRAINT FK_BPM_PROCESS_CATEGORY_ID FOREIGN KEY(CATEGORY_ID) REFERENCES BPM_CATEGORY(ID)
);

COMMENT ON TABLE BPM_PROCESS IS '流程定义';
COMMENT ON COLUMN BPM_PROCESS.ID IS '主键';
COMMENT ON COLUMN BPM_PROCESS.NAME IS '名称';
COMMENT ON COLUMN BPM_PROCESS.CATEGORY_ID IS '外键，流程分类';
COMMENT ON COLUMN BPM_PROCESS.PRIORITY IS '排序';
COMMENT ON COLUMN BPM_PROCESS.DESCN IS '备注';
COMMENT ON COLUMN BPM_PROCESS.USE_TASK_CONF IS '是否配置任务';

