feat(ops): 新增安保模块数据模型与 Mapper
新增安保区域人员绑定表 ops_area_security_user 和安保工单扩展表 ops_order_security_ext,以及对应的 DO 和 Mapper 接口。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
16
sql/mysql/ops_area_security_user.sql
Normal file
16
sql/mysql/ops_area_security_user.sql
Normal file
@@ -0,0 +1,16 @@
|
||||
CREATE TABLE ops_area_security_user (
|
||||
id BIGINT AUTO_INCREMENT PRIMARY KEY,
|
||||
area_id BIGINT NOT NULL COMMENT '区域ID,关联 ops_bus_area.id',
|
||||
user_id BIGINT NOT NULL COMMENT '安保人员用户ID,关联 system_users.id',
|
||||
user_name VARCHAR(64) DEFAULT '' COMMENT '安保人员姓名(冗余)',
|
||||
team_id BIGINT DEFAULT NULL COMMENT '所属班组ID',
|
||||
enabled BIT DEFAULT 1 COMMENT '是否启用',
|
||||
sort INT DEFAULT 0 COMMENT '排序值',
|
||||
creator VARCHAR(64) DEFAULT '',
|
||||
create_time DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||
updater VARCHAR(64) DEFAULT '',
|
||||
update_time DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
deleted BIT DEFAULT 0,
|
||||
tenant_id BIGINT DEFAULT 0,
|
||||
UNIQUE KEY uk_area_user (area_id, user_id, deleted)
|
||||
) COMMENT '区域-安保人员绑定表';
|
||||
Reference in New Issue
Block a user