CREATE TABLE `sequence` (
  `idsequence` int(11) NOT NULL COMMENT 'uuid idsequence',
  `uuid` varchar(45) NOT NULL,
  `name` varchar(100) DEFAULT NULL,
  `depend` int(11) NOT NULL DEFAULT '0',
  `depend_list` text COMMENT 'depend uuid list ',
  `manpower` int(11) NOT NULL DEFAULT '1' COMMENT 'manpower cost',
  `owner` text NOT NULL COMMENT 'executor  or owner',
  `money` double NOT NULL DEFAULT '0' COMMENT 'money cost',
  `time_cost` int(11) NOT NULL DEFAULT '1',
  `delay` int(11) NOT NULL DEFAULT '0' COMMENT 'Allowed delay',
  `time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'record time ',
  `priority` int(11) DEFAULT NULL,
  `start` datetime NOT NULL,
  `end` datetime NOT NULL,
  `input` varchar(45) DEFAULT NULL COMMENT 'input uuid',
  `output` varchar(45) DEFAULT NULL COMMENT 'output uuid ',
  `author` varchar(45) NOT NULL DEFAULT 'hunter' COMMENT 'author or initiator',
  `region` varchar(45) NOT NULL DEFAULT 'CN',
  `status` varchar(45) NOT NULL DEFAULT 'create' COMMENT 'create,begin,process,error,finish,',
  `remark` text COMMENT 'output: index,who[x],start,current,end,cost,money,time,status,remark',
  PRIMARY KEY (`idsequence`,`uuid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='task sequence';