Files
shanxia2.0/backend/scripts/migrate_20260801_crm_contract_approver_setting.sql
T
zlwuandCursor 06956b742b feat(crm): add tenant-level contract approver setting with submit prefill
Mirror the quote approver setting so contract submit dialogs can prefill ordered approvers from a tenant config page while remaining editable.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-01 13:37:23 +08:00

41 lines
1.9 KiB
SQL
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- backend/scripts/migrate_20260801_crm_contract_approver_setting.sql
CREATE TABLE IF NOT EXISTS `crm_contract_approver_setting` (
`id` varchar(64) NOT NULL COMMENT '主键ID(UUID)',
`approver_ids` varchar(1000) NOT NULL DEFAULT '' COMMENT '有序审批人用户ID,逗号分隔',
`status` char(1) NOT NULL DEFAULT '0' COMMENT '0启用 1停用',
`tenant_no` varchar(64) NOT NULL DEFAULT 'shanxia2.0' COMMENT '租户编号',
`order_num` int(11) DEFAULT NULL COMMENT '排序号',
`remark` varchar(500) DEFAULT NULL COMMENT '备注',
`create_by` varchar(64) DEFAULT NULL COMMENT '创建者',
`create_dept_id` varchar(64) NOT NULL DEFAULT '' COMMENT '创建部门',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_by` varchar(64) DEFAULT NULL COMMENT '更新者',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`del_flag` smallint(6) NOT NULL DEFAULT '0' COMMENT '删除标志',
PRIMARY KEY (`id`),
KEY `idx_tenant_no` (`tenant_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='CRM-合同审批人设置(租户级)';
INSERT INTO `sys_menu` (
`id`, `menu_name`, `parent_id`, `menu_type`, `path`, `component`, `perms`,
`is_frame`, `visible`, `status`, `tenant_no`, `order_num`, `remark`,
`create_by`, `create_dept_id`, `create_time`, `update_by`, `update_time`, `del_flag`
) VALUES (
'CRM3000000000000000000000000026',
'合同审批人设置',
'CRM00000000000000000000000000001',
'C',
'contract-approver-setting',
'/crm/contract/approver-setting/index',
'crm:contract:approverSetting',
1, '1', '1', 'shanxia2.0', 56,
'租户级默认合同审批人',
'system', '', NOW(), NULL, NOW(), 0
)
ON DUPLICATE KEY UPDATE
`menu_name`=VALUES(`menu_name`),
`component`=VALUES(`component`),
`perms`=VALUES(`perms`),
`path`=VALUES(`path`);