drop table if exists ip_state;

CREATE TABLE `ip_state` (
  `id` varchar(32) COLLATE utf8mb4_bin NOT NULL COMMENT '主键',
  `ip_id` varchar(32) COLLATE utf8mb4_bin NOT NULL COMMENT '实施流程定义',
  `shape` varchar(20) COLLATE utf8mb4_bin NOT NULL COMMENT '图形样式',
  `label` varchar(50) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '工序名称',
  `memo` varchar(512) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '详细描述',
  `x` int(11) DEFAULT NULL COMMENT '横坐标',
  `y` int(11) DEFAULT NULL COMMENT '纵坐标',
  `is_initial_state` tinyint(1) DEFAULT '0' COMMENT '是否初始',
  `is_finished_state` tinyint(1) DEFAULT '0' COMMENT '是否最终',
  `tenant_id` varchar(32) COLLATE utf8mb4_bin NOT NULL COMMENT '租户',
  PRIMARY KEY (`id`),
  KEY `FK6a8la805awt0s9s7yy0mfvsur` (`ip_id`),
  CONSTRAINT `FK6a8la805awt0s9s7yy0mfvsur` FOREIGN KEY (`ip_id`) REFERENCES `ip_process` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='工序';