1 changed files with 99 additions and 0 deletions
@ -0,0 +1,99 @@ |
|||
ALTER TABLE `resi_group` |
|||
ADD COLUMN `GROUP_TYPE` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'ordinary' COMMENT '小组类型(ordinary:楼院小组 branch:支部小组)' AFTER `VISIT_SWITCH`; |
|||
|
|||
|
|||
CREATE TABLE `notice` ( |
|||
`ID` varchar(64) NOT NULL COMMENT '主键', |
|||
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', |
|||
`AGENCY_ID` varchar(64) NOT NULL COMMENT '组织机构Id', |
|||
`GRID_ID` varchar(64) NOT NULL COMMENT '小组所属网格id', |
|||
`GROUP_ID` varchar(64) NOT NULL COMMENT '小组Id', |
|||
`TITLE` varchar(64) DEFAULT NULL COMMENT '通知标题', |
|||
`CONTENT` varchar(1024) DEFAULT NULL COMMENT '通知内容', |
|||
`IS_CHANGE` varchar(32) NOT NULL COMMENT '是否变更过(是:yes 否:no)', |
|||
`CHANGE_TIME` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '通知变更时间,初始值为首次创建时间', |
|||
`DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标记 0:未删除,1:已删除', |
|||
`REVISION` int(11) NOT NULL COMMENT '乐观锁', |
|||
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', |
|||
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
|||
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', |
|||
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
|||
PRIMARY KEY (`ID`) USING BTREE |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='小组通知表'; |
|||
|
|||
|
|||
CREATE TABLE `notice_attachment` ( |
|||
`ID` varchar(64) NOT NULL COMMENT '主键', |
|||
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', |
|||
`NOTICE_ID` varchar(64) NOT NULL COMMENT '通知Id', |
|||
`FILE_NAME` varchar(255) DEFAULT NULL COMMENT '文件名', |
|||
`ATTACHMENT_NAME` varchar(64) DEFAULT NULL COMMENT '附件名(uuid随机生成)', |
|||
`ATTACHMENT_SIZE` int(11) DEFAULT NULL COMMENT '文件大小,单位b', |
|||
`ATTACHMENT_FORMAT` varchar(64) DEFAULT NULL COMMENT '文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS)', |
|||
`ATTACHMENT_TYPE` varchar(64) DEFAULT NULL COMMENT '附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc))', |
|||
`ATTACHMENT_URL` varchar(255) NOT NULL COMMENT '附件地址', |
|||
`SORT` int(1) NOT NULL COMMENT '排序字段', |
|||
`DURATION` int(11) unsigned zerofill DEFAULT '00000000000' COMMENT '语音或视频时长,秒', |
|||
`DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标记 0:未删除,1:已删除', |
|||
`REVISION` int(11) NOT NULL COMMENT '乐观锁', |
|||
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', |
|||
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
|||
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', |
|||
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
|||
PRIMARY KEY (`ID`) USING BTREE |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='小组通知附件表'; |
|||
|
|||
|
|||
CREATE TABLE `notice_comment` ( |
|||
`ID` varchar(64) NOT NULL COMMENT '主键', |
|||
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', |
|||
`NOTICE_ID` varchar(64) NOT NULL COMMENT '通知Id', |
|||
`COMMENT_CONTENT` varchar(300) DEFAULT NULL COMMENT '评论内容(最多300字符)', |
|||
`DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标记 0:未删除,1:已删除', |
|||
`REVISION` int(11) NOT NULL COMMENT '乐观锁', |
|||
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', |
|||
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
|||
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', |
|||
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
|||
PRIMARY KEY (`ID`) USING BTREE |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='小组通知评论表'; |
|||
|
|||
|
|||
CREATE TABLE `notice_read_record` ( |
|||
`ID` varchar(64) NOT NULL COMMENT '主键', |
|||
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', |
|||
`GRID_ID` varchar(64) NOT NULL COMMENT '小组所属网格id', |
|||
`GROUP_ID` varchar(64) NOT NULL COMMENT '小组id', |
|||
`NOTICE_ID` varchar(64) NOT NULL COMMENT '通知Id', |
|||
`USER_ID` varchar(64) NOT NULL COMMENT '用户id', |
|||
`READ_FLAG` varchar(32) NOT NULL DEFAULT 'unread' COMMENT 'read已读、un_read未读', |
|||
`DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识', |
|||
`REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', |
|||
`CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', |
|||
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
|||
`UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', |
|||
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
|||
PRIMARY KEY (`ID`) |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='小组通知组成员阅读记录表'; |
|||
|
|||
|
|||
CREATE TABLE `resi_group_setup` ( |
|||
`ID` varchar(64) NOT NULL COMMENT '主键', |
|||
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID,初始默认为default', |
|||
`LOGO` varchar(256) DEFAULT NULL COMMENT '默认小组头像', |
|||
`NAME` varchar(64) DEFAULT NULL COMMENT '小组名称', |
|||
`DESCRIBE` varchar(500) DEFAULT NULL COMMENT '小组简介', |
|||
`GROUP_TYPE` varchar(32) NOT NULL DEFAULT 'ordinary' COMMENT '小组类型(ordinary:楼院小组 branch:支部小组)', |
|||
`CATEGORY` varchar(32) NOT NULL COMMENT '专用:dedicated;常用:common_used', |
|||
`DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标记 0:未删除,1:已删除', |
|||
`REVISION` int(11) NOT NULL COMMENT '乐观锁', |
|||
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', |
|||
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
|||
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', |
|||
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
|||
PRIMARY KEY (`ID`) USING BTREE |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='建组设置'; |
|||
|
|||
INSERT INTO `epmet_resi_group`.`resi_group_setup` (`ID`, `CUSTOMER_ID`, `LOGO`, `NAME`, `DESCRIBE`, `GROUP_TYPE`, `CATEGORY`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('6ffe1249a0b411eba4ebc03fd56f7847', 'default', 'https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/20210421/14a78c5ffe08407586a62dd2a12cc316.jpg', '楼院小组', '党员及热心居民建组,就身边事进行小范围讨论,形成议题,用群众路线解决群众问题,发挥群团带动、居民自治。', 'ordinary', 'common_used', '0', '0', 'APP_USER', '2021-04-19 10:07:37', 'APP_USER', '2021-04-19 10:07:45'); |
|||
INSERT INTO `epmet_resi_group`.`resi_group_setup` (`ID`, `CUSTOMER_ID`, `LOGO`, `NAME`, `DESCRIBE`, `GROUP_TYPE`, `CATEGORY`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('849ffc2ea0b411eba4ebc03fd56f7847', 'default', 'https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/20210421/d80dff7d1be54b98949208b63cda2b78.jpg', '支部小组', '组长建议为支部书记、支部组织委员,成员为支部内所有党员。组内组织活动,如:“三会一课”、“联建共建”。', 'branch', 'dedicated', '0', '0', 'APP_USER', '2021-04-19 10:07:37', 'APP_USER', '2021-04-19 10:07:45'); |
|||
|
Loading…
Reference in new issue