CREATE TABLE `zh_shenpi_group`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `tid` int NULL COMMENT '标段id',
  `sp_type` tinyint(4) NULL COMMENT '审批流程类型',
  `name` varchar(255) NULL COMMENT '审批组名称',
  `is_select` tinyint(1) NULL DEFAULT 0 COMMENT '默认审批组',
  `change_type` json NULL COMMENT '变更模块json',
  `create_time` datetime NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE = InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT = '审批流程组表';

ALTER TABLE `zh_shenpi_audit`
ADD COLUMN `sp_group` int(11) NULL DEFAULT 0 COMMENT '审批组id' AFTER `audit_order`;

ALTER TABLE `zh_change`
ADD COLUMN `sp_group` int(11) NULL DEFAULT 0 COMMENT '固定审批组id' AFTER `delimit`;

ALTER TABLE `zh_change_project_audit`
ADD COLUMN `audit_type`  tinyint(4) UNSIGNED NOT NULL DEFAULT 1 COMMENT '审批类型(1个人，2会签，3或签)' AFTER `opinion`,
ADD COLUMN `audit_order`  tinyint(4) UNSIGNED NOT NULL DEFAULT 0 COMMENT '审批顺序' AFTER `audit_type`;

ALTER TABLE `zh_change_project`
ADD COLUMN `sp_group` int(11) NULL DEFAULT 0 COMMENT '固定审批组id' AFTER `content`;

ALTER TABLE `zh_change_apply_audit`
ADD COLUMN `audit_type`  tinyint(4) UNSIGNED NOT NULL DEFAULT 1 COMMENT '审批类型(1个人，2会签，3或签)' AFTER `opinion`,
ADD COLUMN `audit_order`  tinyint(4) UNSIGNED NOT NULL DEFAULT 0 COMMENT '审批顺序' AFTER `audit_type`;

ALTER TABLE `zh_change_apply`
ADD COLUMN `sp_group` int(11) NULL DEFAULT 0 COMMENT '固定审批组id' AFTER `decimal`;

ALTER TABLE `zh_change_plan_audit`
ADD COLUMN `audit_type`  tinyint(4) UNSIGNED NOT NULL DEFAULT 1 COMMENT '审批类型(1个人，2会签，3或签)' AFTER `opinion`,
ADD COLUMN `audit_order`  tinyint(4) UNSIGNED NOT NULL DEFAULT 0 COMMENT '审批顺序' AFTER `audit_type`;

ALTER TABLE `zh_change_plan`
ADD COLUMN `sp_group` int(11) NULL DEFAULT 0 COMMENT '固定审批组id' AFTER `decimal`;

ALTER TABLE `zh_stage`
ADD COLUMN `final_auditor_str` varchar(50) NOT NULL DEFAULT '' COMMENT '终审人相关' AFTER `pre_negative_qc_tp`;

ALTER TABLE `zh_global_log`
ADD COLUMN `memo` varchar(255) NOT NULL DEFAULT '' AFTER `run_time`;
