Update app version [skip ci]
This commit is contained in:
89
apps/feedback/1.0.3/data.yml
Normal file
89
apps/feedback/1.0.3/data.yml
Normal file
@@ -0,0 +1,89 @@
|
||||
additionalProperties:
|
||||
formFields:
|
||||
- child:
|
||||
default: ""
|
||||
envKey: PANEL_DB_HOST
|
||||
required: true
|
||||
type: service
|
||||
default: mariadb
|
||||
edit: true
|
||||
envKey: PANEL_DB_TYPE
|
||||
labelZh: MySQL 服务 (前置检查)
|
||||
labelEn: Database Service (Pre-check)
|
||||
required: true
|
||||
type: apps
|
||||
values:
|
||||
- label: MariaDB
|
||||
value: mariadb
|
||||
- label: MySQL
|
||||
value: mysql
|
||||
- label: Percona
|
||||
value: percona
|
||||
- default: "/home/feedback"
|
||||
edit: true
|
||||
envKey: FEEDBACK_ROOT_PATH
|
||||
labelZh: 数据持久化路径
|
||||
labelEn: Data persistence path
|
||||
required: true
|
||||
type: text
|
||||
- default: 8080
|
||||
edit: true
|
||||
envKey: PANEL_APP_PORT_HTTP
|
||||
labelZh: WebUI 端口
|
||||
labelEn: WebUI port
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
- default: "http://127.0.0.18080"
|
||||
edit: true
|
||||
envKey: FEEDBACK_WEBSITE
|
||||
labelZh: 访问地址
|
||||
labelEn: Access Address
|
||||
required: true
|
||||
type: text
|
||||
- default: "备案号"
|
||||
edit: true
|
||||
envKey: FEEDBACK_BEI_AN
|
||||
labelZh: 备案号
|
||||
labelEn: Record Number
|
||||
required: true
|
||||
type: text
|
||||
- default: "127.0.0.1"
|
||||
edit: true
|
||||
envKey: DB_HOSTNAME
|
||||
labelZh: 数据库 主机地址
|
||||
labelEn: Database Host
|
||||
required: true
|
||||
type: text
|
||||
- default: 5432
|
||||
edit: true
|
||||
envKey: DB_PORT
|
||||
labelZh: 数据库 端口
|
||||
labelEn: Database Port
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
- default: "feedback"
|
||||
edit: true
|
||||
envKey: DB_NAME
|
||||
labelZh: 数据库 名称
|
||||
labelEn: Database Name
|
||||
required: true
|
||||
rule: paramCommon
|
||||
type: text
|
||||
- default: "feedback"
|
||||
edit: true
|
||||
envKey: MYSQL_USERNAME
|
||||
labelZh: 数据库 用户名
|
||||
labelEn: Database Username
|
||||
required: true
|
||||
type: text
|
||||
- default: ""
|
||||
edit: true
|
||||
envKey: MYSQL_PASSWORD
|
||||
labelZh: 数据库 密码
|
||||
labelEn: Database Password
|
||||
random: true
|
||||
required: true
|
||||
rule: paramComplexity
|
||||
type: password
|
||||
22
apps/feedback/1.0.3/docker-compose.yml
Normal file
22
apps/feedback/1.0.3/docker-compose.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
networks:
|
||||
1panel-network:
|
||||
external: true
|
||||
|
||||
services:
|
||||
feedback:
|
||||
image: q2316367743/feedback:1.0.3
|
||||
container_name: ${CONTAINER_NAME}
|
||||
labels:
|
||||
createdBy: "Apps"
|
||||
restart: always
|
||||
networks:
|
||||
- 1panel-network
|
||||
ports:
|
||||
- ${PANEL_APP_PORT_HTTP}:8080
|
||||
env_file:
|
||||
- ${GLOBAL_ENV_FILE:-/etc/1panel/envs/global.env}
|
||||
- ${ENV_FILE:-/etc/1panel/envs/default.env}
|
||||
volumes:
|
||||
- ${FEEDBACK_ROOT_PATH}/data:/app/public/data
|
||||
environment:
|
||||
- MYSQL_URL=jdbc:mariadb://${DB_HOSTNAME}:${DB_PORT}/${DB_NAME}?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai
|
||||
2
apps/feedback/1.0.3/envs/default.env
Normal file
2
apps/feedback/1.0.3/envs/default.env
Normal file
@@ -0,0 +1,2 @@
|
||||
# copyright© 2024 XinJiang Ms Studio
|
||||
ENV_FILE=.env
|
||||
2
apps/feedback/1.0.3/envs/global.env
Normal file
2
apps/feedback/1.0.3/envs/global.env
Normal file
@@ -0,0 +1,2 @@
|
||||
# copyright© 2024 XinJiang Ms Studio
|
||||
TZ=Asia/Shanghai
|
||||
17
apps/feedback/1.0.3/scripts/init.sh
Normal file
17
apps/feedback/1.0.3/scripts/init.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -f .env ]; then
|
||||
source .env
|
||||
|
||||
# setup-1 add default values
|
||||
CURRENT_DIR=$(pwd)
|
||||
sed -i '/^ENV_FILE=/d' .env
|
||||
sed -i '/^GLOBAL_ENV_FILE=/d' .env
|
||||
echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env
|
||||
echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.env" >> .env
|
||||
|
||||
echo "Check Finish."
|
||||
|
||||
else
|
||||
echo "Error: .env file not found."
|
||||
fi
|
||||
10
apps/feedback/1.0.3/scripts/uninstall.sh
Normal file
10
apps/feedback/1.0.3/scripts/uninstall.sh
Normal file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -f .env ]; then
|
||||
source .env
|
||||
|
||||
echo "Check Finish."
|
||||
|
||||
else
|
||||
echo "Error: .env file not found."
|
||||
fi
|
||||
17
apps/feedback/1.0.3/scripts/upgrade.sh
Normal file
17
apps/feedback/1.0.3/scripts/upgrade.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -f .env ]; then
|
||||
source .env
|
||||
|
||||
# setup-1 add default values
|
||||
CURRENT_DIR=$(pwd)
|
||||
sed -i '/^ENV_FILE=/d' .env
|
||||
sed -i '/^GLOBAL_ENV_FILE=/d' .env
|
||||
echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env
|
||||
echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.env" >> .env
|
||||
|
||||
echo "Check Finish."
|
||||
|
||||
else
|
||||
echo "Error: .env file not found."
|
||||
fi
|
||||
102
apps/feedback/1.0.3/sql/1.0.3.sql
Normal file
102
apps/feedback/1.0.3/sql/1.0.3.sql
Normal file
@@ -0,0 +1,102 @@
|
||||
-- 由于新增了管理员角色,所以酱默认创建的账号改为管理员角色
|
||||
update user
|
||||
set role = 3
|
||||
where id = '1';
|
||||
|
||||
alter table user_account
|
||||
add plugin_id varchar(32) default '' not null comment '插件ID,只有uTools注册的才有';
|
||||
|
||||
alter table user_account
|
||||
drop
|
||||
key user_account_auth_method_auth_key_uindex;
|
||||
|
||||
alter table update_log
|
||||
add view_count int unsigned default 0 not null comment '浏览数量';
|
||||
|
||||
alter table update_log
|
||||
add like_count int unsigned default 0 not null comment '喜欢数量';
|
||||
|
||||
alter table update_log
|
||||
add reply_count int unsigned default 0 not null comment '评论数量';
|
||||
|
||||
|
||||
create table update_log_reply
|
||||
(
|
||||
id varchar(32) not null
|
||||
primary key,
|
||||
|
||||
is_delete tinyint(1) unsigned default 0 not null comment '逻辑删除',
|
||||
create_id varchar(32) default '' not null comment '创建人',
|
||||
create_time datetime default '1970-01-01 00:00:00' not null comment '创建时间',
|
||||
update_id varchar(32) default '' not null comment '更新人',
|
||||
update_time datetime default '1970-01-01 00:00:00' not null comment '更新时间',
|
||||
|
||||
plugin_id varchar(32) not null default '' comment '插件ID',
|
||||
update_log_id varchar(32) not null default '' comment '博客ID',
|
||||
|
||||
content varchar(512) not null default '' comment '回复内容'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci comment '博客评论表';
|
||||
|
||||
create table story
|
||||
(
|
||||
id varchar(32) not null
|
||||
primary key,
|
||||
|
||||
is_delete tinyint(1) unsigned default 0 not null comment '逻辑删除',
|
||||
create_id varchar(32) default '' not null comment '创建人',
|
||||
create_time datetime default '1970-01-01 00:00:00' not null comment '创建时间',
|
||||
update_id varchar(32) default '' not null comment '更新人',
|
||||
update_time datetime default '1970-01-01 00:00:00' not null comment '更新时间',
|
||||
|
||||
plugin_id varchar(32) not null default '' comment '插件ID',
|
||||
sort int unsigned default 0 not null comment '排序',
|
||||
title varchar(64) default '' not null comment '标题',
|
||||
content longtext not null comment '内容',
|
||||
view_count int unsigned default 0 not null comment '浏览数',
|
||||
like_count int unsigned default 0 not null comment '喜欢数'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci comment '我们的故事';
|
||||
|
||||
create table faq_group
|
||||
(
|
||||
id varchar(32) not null
|
||||
primary key,
|
||||
|
||||
is_delete tinyint(1) unsigned default 0 not null comment '逻辑删除',
|
||||
create_id varchar(32) default '' not null comment '创建人',
|
||||
create_time datetime default '1970-01-01 00:00:00' not null comment '创建时间',
|
||||
update_id varchar(32) default '' not null comment '更新人',
|
||||
update_time datetime default '1970-01-01 00:00:00' not null comment '更新时间',
|
||||
|
||||
plugin_id varchar(32) not null default '' comment '插件ID',
|
||||
title varchar(256) default '' not null comment '分类标题',
|
||||
sort int unsigned default 0 not null comment '排序'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci comment '常见问题-分类';
|
||||
|
||||
create table faq
|
||||
(
|
||||
id varchar(32) not null
|
||||
primary key,
|
||||
|
||||
is_delete tinyint(1) unsigned default 0 not null comment '逻辑删除',
|
||||
create_id varchar(32) default '' not null comment '创建人',
|
||||
create_time datetime default '1970-01-01 00:00:00' not null comment '创建时间',
|
||||
update_id varchar(32) default '' not null comment '更新人',
|
||||
update_time datetime default '1970-01-01 00:00:00' not null comment '更新时间',
|
||||
|
||||
plugin_id varchar(32) not null default '' comment '插件ID',
|
||||
group_id varchar(32) default '' not null comment '所属分类',
|
||||
|
||||
title varchar(256) default '' not null comment '分类标题',
|
||||
sort int unsigned default 0 not null comment '排序',
|
||||
|
||||
view_count int unsigned default 0 not null comment '浏览数',
|
||||
like_count int unsigned default 0 not null comment '喜欢数',
|
||||
no_like_count int unsigned default 0 not null comment '不喜欢数量'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci comment '常见问题';
|
||||
|
||||
create table faq_content
|
||||
(
|
||||
id varchar(32) not null primary key,
|
||||
is_delete tinyint(1) unsigned not null default 0 comment '逻辑删除',
|
||||
content longtext not null comment '内容,Markdown,让前端去渲染'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci comment '常见问题内容表';
|
||||
440
apps/feedback/1.0.3/sql/init.sql
Normal file
440
apps/feedback/1.0.3/sql/init.sql
Normal file
@@ -0,0 +1,440 @@
|
||||
create table user
|
||||
(
|
||||
id varchar(32) primary key,
|
||||
is_delete tinyint(1) unsigned not null default 0 comment '逻辑删除',
|
||||
create_id varchar(32) not null default '' comment '创建人',
|
||||
create_time datetime not null default '1970-01-01 00:00:00' comment '创建时间',
|
||||
update_id varchar(32) not null default '' comment '更新人',
|
||||
update_time datetime not null default '1970-01-01 00:00:00' comment '更新时间',
|
||||
nickname varchar(32) not null default '' comment '昵称',
|
||||
avatar varchar(255) not null default '' comment '头像',
|
||||
|
||||
is_enable tinyint(1) unsigned not null default 1 comment '是否启用',
|
||||
|
||||
last_login_ip varchar(64) not null default '' comment '最后登录IP',
|
||||
last_login_time datetime not null default '1970-01-01 00:00:00' comment '最后登录时间',
|
||||
|
||||
role tinyint unsigned not null default 0 comment '用户角色'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci comment '用户表';
|
||||
|
||||
create table user_auth
|
||||
(
|
||||
id varchar(32) primary key comment '用户ID',
|
||||
is_delete tinyint(1) unsigned not null default 0 comment '逻辑删除',
|
||||
create_id varchar(32) not null default '' comment '创建人',
|
||||
create_time datetime not null default '1970-01-01 00:00:00' comment '创建时间',
|
||||
update_id varchar(32) not null default '' comment '更新人',
|
||||
update_time datetime not null default '1970-01-01 00:00:00' comment '更新时间',
|
||||
password varchar(64) not null comment '密码'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci comment '用户认证表';
|
||||
|
||||
create table user_account
|
||||
(
|
||||
id varchar(32) not null
|
||||
primary key,
|
||||
is_delete tinyint(1) unsigned default 0 not null comment '逻辑删除',
|
||||
create_id varchar(32) default '' not null comment '创建人',
|
||||
create_time datetime default '1970-01-01 00:00:00' not null comment '创建时间',
|
||||
update_id varchar(32) default '' not null comment '更新人',
|
||||
update_time datetime default '1970-01-01 00:00:00' not null comment '更新时间',
|
||||
user_id varchar(32) default '' not null comment '用户ID',
|
||||
auth_method tinyint unsigned default 0 not null comment '认证方式',
|
||||
auth_key varchar(128) default '' not null comment '认证key',
|
||||
auth_unique varchar(128) default '' not null comment '认证唯一值',
|
||||
plugin_id varchar(32) default '' not null comment '插件ID,只有uTools注册的才有'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci comment '用户账号表';
|
||||
|
||||
create table user_notice
|
||||
(
|
||||
id varchar(32) not null
|
||||
primary key,
|
||||
is_delete tinyint(1) unsigned default 0 not null comment '逻辑删除',
|
||||
create_id varchar(32) default '' not null comment '创建人',
|
||||
create_time datetime default '1970-01-01 00:00:00' not null comment '创建时间',
|
||||
update_id varchar(32) default '' not null comment '更新人',
|
||||
update_time datetime default '1970-01-01 00:00:00' not null comment '更新时间',
|
||||
platform tinyint unsigned default 0 not null comment '平台',
|
||||
token varchar(64) default '' not null comment 'token',
|
||||
sign varchar(128) default '' not null comment '签名,有些平台有,比如钉钉'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci comment '用户通知表';
|
||||
|
||||
create table user_message
|
||||
(
|
||||
id varchar(32) not null
|
||||
primary key,
|
||||
is_delete tinyint(1) unsigned default 0 not null comment '逻辑删除',
|
||||
create_id varchar(32) default '' not null comment '创建人',
|
||||
create_time datetime default '1970-01-01 00:00:00' not null comment '创建时间',
|
||||
update_id varchar(32) default '' not null comment '更新人',
|
||||
update_time datetime default '1970-01-01 00:00:00' not null comment '更新时间',
|
||||
setting varchar(32) default '' not null comment '相关设置,默认关闭,1为打开'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci comment '用户消息表';
|
||||
|
||||
create table user_message_notice
|
||||
(
|
||||
id varchar(32) not null
|
||||
primary key,
|
||||
|
||||
is_delete tinyint(1) unsigned default 0 not null comment '逻辑删除',
|
||||
create_id varchar(32) default '' not null comment '创建人',
|
||||
create_time datetime default '1970-01-01 00:00:00' not null comment '创建时间',
|
||||
update_id varchar(32) default '' not null comment '更新人',
|
||||
update_time datetime default '1970-01-01 00:00:00' not null comment '更新时间',
|
||||
|
||||
user_id varchar(32) default '' not null comment '接收人',
|
||||
is_read tinyint(1) unsigned default 0 not null comment '是否已读',
|
||||
|
||||
title varchar(128) default '' not null comment '标题',
|
||||
content longtext not null comment ' 内容',
|
||||
action tinyint unsigned not null default 0 comment '动作',
|
||||
target varchar(255) default '' not null comment '目标',
|
||||
type tinyint unsigned default 0 not null comment '消息类型'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci comment '用户消息通知表';
|
||||
|
||||
create table plugin
|
||||
(
|
||||
id varchar(32) primary key,
|
||||
is_delete tinyint(1) unsigned not null default 0 comment '逻辑删除',
|
||||
create_id varchar(32) not null default '' comment '创建人',
|
||||
create_time datetime not null default '1970-01-01 00:00:00' comment '创建时间',
|
||||
update_id varchar(32) not null default '' comment '更新人',
|
||||
update_time datetime not null default '1970-01-01 00:00:00' comment '更新时间',
|
||||
is_archiving tinyint(1) unsigned not null default 0 comment '是否已归档',
|
||||
cover varchar(255) not null default '' comment '插件图标',
|
||||
name varchar(32) not null default '' comment '插件名称',
|
||||
description varchar(255) not null default '' comment '插件描述',
|
||||
u_tools_id varchar(32) not null default '' comment 'uTools的插件ID',
|
||||
u_tools_token varchar(64) not null default '' comment 'uTools的插token'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci comment '插件';
|
||||
|
||||
create table plugin_field
|
||||
(
|
||||
id varchar(32) primary key,
|
||||
is_delete tinyint(1) unsigned not null default 0 comment '逻辑删除',
|
||||
create_id varchar(32) not null default '' comment '创建人',
|
||||
create_time datetime not null default '1970-01-01 00:00:00' comment '创建时间',
|
||||
update_id varchar(32) not null default '' comment '更新人',
|
||||
update_time datetime not null default '1970-01-01 00:00:00' comment '更新时间',
|
||||
plugin_id varchar(32) not null default '' comment '插件ID',
|
||||
field varchar(32) not null default '' comment '字段',
|
||||
required tinyint(1) unsigned not null default 0 comment '是否是必要的'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci comment '插件字段';
|
||||
|
||||
create table plugin_user
|
||||
(
|
||||
id varchar(32) primary key,
|
||||
is_delete tinyint(1) unsigned not null default 0 comment '逻辑删除',
|
||||
create_id varchar(32) not null default '' comment '创建人',
|
||||
create_time datetime not null default '1970-01-01 00:00:00' comment '创建时间',
|
||||
plugin_id varchar(32) not null default '' comment '插件ID',
|
||||
user_id varchar(32) not null default '' comment '用户ID'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci comment '插件用户表';
|
||||
|
||||
create table feedback
|
||||
(
|
||||
id varchar(32) primary key,
|
||||
|
||||
is_delete tinyint(1) unsigned not null default 0 comment '逻辑删除',
|
||||
create_id varchar(32) not null default '' comment '创建人',
|
||||
create_time datetime not null default '1970-01-01 00:00:00' comment '创建时间',
|
||||
update_id varchar(32) not null default '' comment '更新人',
|
||||
update_time datetime not null default '1970-01-01 00:00:00' comment '更新时间',
|
||||
|
||||
plugin_id varchar(32) not null default '' comment '插件ID',
|
||||
|
||||
is_good tinyint(1) unsigned not null default 0 comment '是否是好问题',
|
||||
is_top tinyint(1) unsigned not null default 0 comment '是否置顶',
|
||||
is_hidden tinyint(1) unsigned not null default 0 comment '是否隐藏',
|
||||
|
||||
is_reply tinyint(1) unsigned not null default 0 comment '管理员是否回复',
|
||||
is_close tinyint(1) unsigned not null default 0 comment '是否关闭',
|
||||
|
||||
reply_count int unsigned not null default 0 comment '回复数量',
|
||||
like_count int unsigned not null default 0 comment '喜欢数量',
|
||||
|
||||
type tinyint(1) unsigned not null default 0 comment '反馈类型'
|
||||
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci comment '反馈表';
|
||||
|
||||
create table feedback_info
|
||||
(
|
||||
id varchar(32) not null primary key comment '反馈ID',
|
||||
is_delete tinyint(1) unsigned not null default 0 comment '逻辑删除',
|
||||
user_agent varchar(256) not null default '' comment 'user-agent',
|
||||
ip varchar(128) not null default '' comment '反馈者IP'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci comment '反馈信息表';
|
||||
|
||||
create table feedback_field
|
||||
(
|
||||
id varchar(32) primary key,
|
||||
is_delete tinyint(1) unsigned not null default 0 comment '逻辑删除',
|
||||
plugin_id varchar(32) not null default '' comment '插件ID',
|
||||
feedback_id varchar(32) not null default '' comment '反馈ID',
|
||||
plugin_field_id varchar(32) not null default '' comment '插件字段ID',
|
||||
plugin_field_key varchar(32) not null default '' comment '插件字段',
|
||||
plugin_field_value varchar(32) not null default '' comment '插件字段值'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci comment '反馈字段';
|
||||
|
||||
create table feedback_content
|
||||
(
|
||||
id varchar(32) not null primary key,
|
||||
is_delete tinyint(1) unsigned not null default 0 comment '逻辑删除',
|
||||
content longtext not null comment '内容,Markdown,让前端去渲染'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci comment '反馈内容表';
|
||||
|
||||
create table feedback_like
|
||||
(
|
||||
id varchar(32) primary key,
|
||||
is_delete tinyint(1) unsigned not null default 0 comment '逻辑删除',
|
||||
create_id varchar(32) not null default '' comment '创建人',
|
||||
create_time datetime not null default '1970-01-01 00:00:00' comment '创建时间',
|
||||
|
||||
plugin_id varchar(32) not null default '' comment '插件ID',
|
||||
feedback_id varchar(32) not null default '' comment '反馈ID',
|
||||
constraint create_id_feedback_id
|
||||
unique (create_id, feedback_id)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci comment '反馈喜欢表';
|
||||
|
||||
create table reply
|
||||
(
|
||||
id varchar(32) primary key,
|
||||
|
||||
is_delete tinyint(1) unsigned not null default 0 comment '逻辑删除',
|
||||
create_id varchar(32) not null default '' comment '创建人',
|
||||
create_time datetime not null default '1970-01-01 00:00:00' comment '创建时间',
|
||||
update_id varchar(32) not null default '' comment '更新人',
|
||||
update_time datetime not null default '1970-01-01 00:00:00' comment '更新时间',
|
||||
|
||||
plugin_id varchar(32) not null default '' comment '插件ID',
|
||||
feedback_id varchar(32) not null default '' comment '反馈ID',
|
||||
parent_id varchar(32) not null default '' comment '父级回复ID',
|
||||
|
||||
like_count int unsigned not null default 0 comment '喜欢人数'
|
||||
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci comment '回复表';
|
||||
|
||||
|
||||
create table reply_content
|
||||
(
|
||||
id varchar(32) primary key,
|
||||
is_delete tinyint(1) unsigned not null default 0 comment '逻辑删除',
|
||||
content longtext not null comment '内容,Markdown,让前端去渲染'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci comment '回复内容表';
|
||||
|
||||
create table reply_like
|
||||
(
|
||||
id varchar(32) primary key,
|
||||
|
||||
is_delete tinyint(1) unsigned not null default 0 comment '逻辑删除',
|
||||
create_id varchar(32) not null default '' comment '创建人',
|
||||
create_time datetime not null default '1970-01-01 00:00:00' comment '创建时间',
|
||||
|
||||
plugin_id varchar(32) not null default '' comment '插件ID',
|
||||
feedback_id varchar(32) not null default '' comment '反馈ID',
|
||||
reply_id varchar(32) not null default '' comment '回复ID',
|
||||
constraint create_id_reply_id
|
||||
unique (create_id, reply_id)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci comment '反馈喜欢表';
|
||||
|
||||
create table blog
|
||||
(
|
||||
id varchar(32) not null
|
||||
primary key,
|
||||
|
||||
is_delete tinyint(1) unsigned default 0 not null comment '逻辑删除',
|
||||
create_id varchar(32) default '' not null comment '创建人',
|
||||
create_time datetime default '1970-01-01 00:00:00' not null comment '创建时间',
|
||||
update_id varchar(32) default '' not null comment '更新人',
|
||||
update_time datetime default '1970-01-01 00:00:00' not null comment '更新时间',
|
||||
|
||||
plugin_id varchar(32) default '' not null comment '插件ID',
|
||||
|
||||
title varchar(32) default '' not null comment '标题',
|
||||
description varchar(128) default '' not null comment '描述',
|
||||
|
||||
view_count int unsigned default 0 not null comment '阅读数量',
|
||||
like_count int unsigned default 0 not null comment '喜欢数量',
|
||||
comment_count int unsigned default 0 not null comment '评论数量'
|
||||
) comment '博客表';
|
||||
|
||||
create table blog_content
|
||||
(
|
||||
id varchar(32) primary key,
|
||||
is_delete tinyint(1) unsigned not null default 0 comment '逻辑删除',
|
||||
content longtext not null comment '内容,Markdown,让前端去渲染'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci comment '博客内容表';
|
||||
|
||||
create table blog_like
|
||||
(
|
||||
id varchar(32) primary key,
|
||||
is_delete tinyint(1) unsigned not null default 0 comment '逻辑删除',
|
||||
create_id varchar(32) not null default '' comment '创建人',
|
||||
create_time datetime not null default '1970-01-01 00:00:00' comment '创建时间',
|
||||
|
||||
blog_id varchar(32) not null default '' comment '博客ID',
|
||||
constraint create_id_blog_id
|
||||
unique (create_id, blog_id)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci comment '博客喜欢表';
|
||||
|
||||
create table blog_reply
|
||||
(
|
||||
id varchar(32) not null
|
||||
primary key,
|
||||
|
||||
is_delete tinyint(1) unsigned default 0 not null comment '逻辑删除',
|
||||
create_id varchar(32) default '' not null comment '创建人',
|
||||
create_time datetime default '1970-01-01 00:00:00' not null comment '创建时间',
|
||||
update_id varchar(32) default '' not null comment '更新人',
|
||||
update_time datetime default '1970-01-01 00:00:00' not null comment '更新时间',
|
||||
|
||||
plugin_id varchar(32) not null default '' comment '插件ID',
|
||||
blog_id varchar(32) not null default '' comment '博客ID',
|
||||
parent_id varchar(32) not null default '' comment '父级回复ID',
|
||||
|
||||
content varchar(128) not null default '' comment '回复内容'
|
||||
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci comment '博客评论表';
|
||||
|
||||
create table update_log
|
||||
(
|
||||
id varchar(32) not null
|
||||
primary key,
|
||||
|
||||
is_delete tinyint(1) unsigned default 0 not null comment '逻辑删除',
|
||||
create_id varchar(32) default '' not null comment '创建人',
|
||||
create_time datetime default '1970-01-01 00:00:00' not null comment '创建时间',
|
||||
update_id varchar(32) default '' not null comment '更新人',
|
||||
update_time datetime default '1970-01-01 00:00:00' not null comment '更新时间',
|
||||
|
||||
plugin_id varchar(32) default '' not null comment '插件ID',
|
||||
|
||||
version varchar(32) default '' not null comment '版本',
|
||||
publish_date date default '1970-01-01' not null comment '发布日期',
|
||||
|
||||
|
||||
view_count int unsigned default 0 not null comment '浏览数量',
|
||||
like_count int unsigned default 0 not null comment '喜欢数量',
|
||||
reply_count int unsigned default 0 not null comment '评论数量'
|
||||
) comment '更新日志表';
|
||||
|
||||
create table update_log_content
|
||||
(
|
||||
id varchar(32) primary key,
|
||||
is_delete tinyint(1) unsigned not null default 0 comment '逻辑删除',
|
||||
content longtext not null comment '内容,Markdown,让前端去渲染'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci comment '更新日志内容表';
|
||||
|
||||
create table update_log_thank
|
||||
(
|
||||
id varchar(32) primary key,
|
||||
is_delete tinyint(1) unsigned not null default 0 comment '逻辑删除',
|
||||
create_id varchar(32) not null default '' comment '创建人',
|
||||
create_time datetime not null default '1970-01-01 00:00:00' comment '创建时间',
|
||||
|
||||
update_log_id varchar(32) not null default '' comment '更新日志ID',
|
||||
|
||||
thank_id varchar(32) not null default '' comment '感谢的人ID',
|
||||
|
||||
constraint create_id_update_log_id_thank_id
|
||||
unique (create_id, update_log_id, thank_id)
|
||||
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci comment '更新日志感谢表';
|
||||
|
||||
create table update_log_like
|
||||
(
|
||||
id varchar(32) primary key,
|
||||
is_delete tinyint(1) unsigned not null default 0 comment '逻辑删除',
|
||||
create_id varchar(32) not null default '' comment '创建人',
|
||||
create_time datetime not null default '1970-01-01 00:00:00' comment '创建时间',
|
||||
|
||||
update_log_id varchar(32) not null default '' comment '更新日志ID',
|
||||
constraint create_id_update_log_id
|
||||
unique (create_id, update_log_id)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci comment '更新日志喜欢表';
|
||||
|
||||
create table update_log_reply
|
||||
(
|
||||
id varchar(32) not null
|
||||
primary key,
|
||||
|
||||
is_delete tinyint(1) unsigned default 0 not null comment '逻辑删除',
|
||||
create_id varchar(32) default '' not null comment '创建人',
|
||||
create_time datetime default '1970-01-01 00:00:00' not null comment '创建时间',
|
||||
update_id varchar(32) default '' not null comment '更新人',
|
||||
update_time datetime default '1970-01-01 00:00:00' not null comment '更新时间',
|
||||
|
||||
plugin_id varchar(32) not null default '' comment '插件ID',
|
||||
update_log_id varchar(32) not null default '' comment '博客ID',
|
||||
|
||||
content varchar(512) not null default '' comment '回复内容'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci comment '博客评论表';
|
||||
|
||||
create table story
|
||||
(
|
||||
id varchar(32) not null
|
||||
primary key,
|
||||
|
||||
is_delete tinyint(1) unsigned default 0 not null comment '逻辑删除',
|
||||
create_id varchar(32) default '' not null comment '创建人',
|
||||
create_time datetime default '1970-01-01 00:00:00' not null comment '创建时间',
|
||||
update_id varchar(32) default '' not null comment '更新人',
|
||||
update_time datetime default '1970-01-01 00:00:00' not null comment '更新时间',
|
||||
|
||||
plugin_id varchar(32) not null default '' comment '插件ID',
|
||||
sort int unsigned default 0 not null comment '排序',
|
||||
title varchar(64) default '' not null comment '标题',
|
||||
content longtext not null comment '内容',
|
||||
view_count int unsigned default 0 not null comment '浏览数',
|
||||
like_count int unsigned default 0 not null comment '喜欢数'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci comment '我们的故事';
|
||||
|
||||
create table faq_group
|
||||
(
|
||||
id varchar(32) not null
|
||||
primary key,
|
||||
|
||||
is_delete tinyint(1) unsigned default 0 not null comment '逻辑删除',
|
||||
create_id varchar(32) default '' not null comment '创建人',
|
||||
create_time datetime default '1970-01-01 00:00:00' not null comment '创建时间',
|
||||
update_id varchar(32) default '' not null comment '更新人',
|
||||
update_time datetime default '1970-01-01 00:00:00' not null comment '更新时间',
|
||||
|
||||
plugin_id varchar(32) not null default '' comment '插件ID',
|
||||
title varchar(256) default '' not null comment '分类标题',
|
||||
sort int unsigned default 0 not null comment '排序'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci comment '常见问题-分类';
|
||||
|
||||
create table faq
|
||||
(
|
||||
id varchar(32) not null
|
||||
primary key,
|
||||
|
||||
is_delete tinyint(1) unsigned default 0 not null comment '逻辑删除',
|
||||
create_id varchar(32) default '' not null comment '创建人',
|
||||
create_time datetime default '1970-01-01 00:00:00' not null comment '创建时间',
|
||||
update_id varchar(32) default '' not null comment '更新人',
|
||||
update_time datetime default '1970-01-01 00:00:00' not null comment '更新时间',
|
||||
|
||||
plugin_id varchar(32) not null default '' comment '插件ID',
|
||||
group_id varchar(32) default '' not null comment '所属分类',
|
||||
|
||||
title varchar(256) default '' not null comment '分类标题',
|
||||
sort int unsigned default 0 not null comment '排序',
|
||||
|
||||
view_count int unsigned default 0 not null comment '浏览数',
|
||||
like_count int unsigned default 0 not null comment '喜欢数',
|
||||
no_like_count int unsigned default 0 not null comment '不喜欢数量'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci comment '常见问题';
|
||||
|
||||
create table faq_content
|
||||
(
|
||||
id varchar(32) not null primary key,
|
||||
is_delete tinyint(1) unsigned not null default 0 comment '逻辑删除',
|
||||
content longtext not null comment '内容,Markdown,让前端去渲染'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_swedish_ci comment '常见问题内容表';
|
||||
|
||||
insert into user(id, nickname, role) value ('1', '管理员', 3);
|
||||
insert into user_message(id) value ('1');
|
||||
insert into user_notice(id) value ('1');
|
||||
insert into user_account(id, user_id, auth_method, auth_key) value ('1', '1', 1, 'admin');
|
||||
insert into user_auth(id, password) value ('1', '$2a$10$.JgPHRytWSeCMftQTkYxKugvWUseEqRf6ZlPHlVMHEg4n9vLZ8icq');
|
||||
Reference in New Issue
Block a user