Files
geg-gas-pcitc/script/20240829/通知表-mysql.sql
2025-02-08 17:51:37 +08:00

52 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.

CREATE TABLE xjr_notice (
id bigint NOT NULL,
title varchar(500) NOT NULL COMMENT '标题',
TYPE bigint NOT NULL COMMENT '类型枚举id',
type_name varchar(100) COMMENT '类型字面值',
publisher bigint COMMENT '发布主体id',
publisher_type integer COMMENT '发布主体类型0用户/1组织',
publisher_name integer COMMENT '发布主体名称',
CONTENT TEXT COMMENT '发布内容',
attachs bigint COMMENT '附件组id',
status integer COMMENT '状态0草稿/1已发布/2已结束',
create_user_id bigint NOT NULL,
create_date timestamp NOT NULL,
modify_user_id bigint,
modify_date timestamp,
delete_mark integer NOT NULL DEFAULT 0,
enabled_mark integer NOT NULL DEFAULT 1,
dept_id bigint,
tenant_id bigint,
rule_user_id bigint
)COMMENT '通知、手动待办';
ALTER TABLE xjr_notice ADD CONSTRAINT con_incident_dev_xjr_notice_constraint_1 PRIMARY KEY (id);
CREATE TABLE xjr_notice_user (
id bigint NOT NULL,
notice_id bigint NOT NULL COMMENT '关联通知id',
user_id bigint NOT NULL,
is_read integer NOT NULL DEFAULT 0 COMMENT '是否已读1',
reply varchar(1000) COMMENT '回复',
create_user_id bigint NOT NULL,
create_date timestamp NOT NULL,
modify_user_id bigint,
modify_date timestamp,
delete_mark integer NOT NULL DEFAULT 0,
enabled_mark integer NOT NULL DEFAULT 1,
dept_id bigint,
tenant_id bigint
)COMMENT '通知用户表';
ALTER TABLE xjr_notice_user ADD CONSTRAINT con_incident_dev_xjr_notice_user_constraint_1 PRIMARY KEY (id);
ALTER TABLE xjr_notice ADD COLUMN `RANGE` integer NOT NULL DEFAULT 1 COMMENT '通知范围0公开/1指定用户';
ALTER TABLE xjr_department ADD COLUMN area_id bigint COMMENT '所在区域id区域表id';
ALTER TABLE xjr_notice ADD COLUMN params_json varchar(5000) COMMENT 'json 参数';
ALTER TABLE xjr_notice ADD COLUMN path varchar(500) COMMENT '路径';