-- 请按如下分类提交sql！！！
-- Version V3.5.50.xxxx
-- uat 2025-xx-xx
-- prod 2025-xx-xx

------------------------------------
-- 表结构
------------------------------------
ALTER TABLE `zh_construction_unit`
MODIFY COLUMN `sign_path` mediumtext CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL COMMENT '签章图片地址，以逗号分隔' AFTER `basic`,
ADD COLUMN `sign_permission` tinyint(1) NULL DEFAULT 1 COMMENT '授权所有人使用单位章' AFTER `sign_path`;

ALTER TABLE `zh_project_account`
ADD COLUMN `unit_sign_path` mediumtext NULL COMMENT '单位章图片地址' AFTER `stamp_path`;

ALTER TABLE `zh_filing`
ADD COLUMN `file_company` varchar(100) NOT NULL DEFAULT '' COMMENT '归档单位' AFTER `tips`;

ALTER TABLE `zh_filing_template`
ADD COLUMN `file_company` varchar(100) NOT NULL DEFAULT '' COMMENT '归档单位' AFTER `tips`;

ALTER TABLE `zh_sub_project_permission`
ADD COLUMN `last_time` timestamp NULL DEFAULT NULL COMMENT '最近使用时间' AFTER `tp_cache_time`;

ALTER TABLE `zh_tender_info`
ADD COLUMN `calc_type` varchar(20) NOT NULL DEFAULT 'up' COMMENT '计价类型(单价up，总价tp)' AFTER `s_type`;

CREATE TABLE `zh_multi_limit`  (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `pid` int(11) UNSIGNED NOT NULL COMMENT '项目id',
  `limit_id` varchar(36) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT 'uuid',
  `user_id` int(11) NOT NULL COMMENT '创建人',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
  `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '名称',
  `limit` tinyint(4) UNSIGNED NOT NULL DEFAULT 0 COMMENT '限制计量',
  `lower` tinyint(4) UNSIGNED NOT NULL DEFAULT 0 COMMENT '计量下限',
  `upper` tinyint(4) UNSIGNED NOT NULL DEFAULT 100 COMMENT '计量上限',
  `condition` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL COMMENT '判断条件',
  `hint` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '提示文本',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic;

------------------------------------
-- 表数据
------------------------------------
