3.数据库设计
用户表(user)
字段
描述
类型
允许为空
备注
id
编号
Int
否
PK(主键)
name
姓名
Varchar(25)
是
password
密码
Varchar(32)
否
photo
头像
Varchar(100)
是
phone
手机号码
Char(11)
是
UNIQUE(唯一约束)
邮箱地址
Varchar(40)
否
UNIQUE(唯一约束)
create_time
注册时间
datetime
否
update_time
修改时间
datetime
否
state
状态
tinyint
否
0为禁用 1为启用
gender
性别
varchar(10)
否
留言表(leave_info)
字段
描述
类型
允许为空
备注
id
编号
Int
否
PK(主键)
content
内容
Varchar(500)
否
user_id
发送人id
int
否
FK外键
send_time
发送时间
datetime
否
state
处理状态
tinyint
否
0为未查看 1为已查看
社团表(club)
字段
描述
类型
允许为空
备注
id
编号
Int
否
PK(主键)
name
社团名称
varchar(20)
否
introduction
社团介绍
varchar(400)
是
category_id
社团分类编号
int
否
FK(外键)
member_count
社团人数
int
否
create_time
创建时间
datetime
否
update_time
修改时间
datetime
否
admin_id
创建人id
int
否
FK(外键)
user_id
社团团长id
int
否
FK(外键)
state
社团状态
tinyint
否
0为禁用 1为启用
photo
社团头像
varchar(100)
是
用户社团关系表(user_club)
字段
描述
类型
允许为空
备注
id
编号
Int
否
PK(主键)
user_id
用户id
int
否
FK(外键)
club_id
社团id
int
否
FK(外键)
role
角色
tinyint
否
0是成员 1是社长
join_time
加入时间
datetime
否
入团申请表(club_apply)
字段
描述
类型
允许为空
备注
id
编号
Int
否
PK(主键)
user_id
申请人id
int
否
FK(外键)
club_id
社团ID
int
否
FK(外键)
send_time
申请发送时间
datetime
否
apply_reason
申请理由
varchar(100)
否
state
申请状态
tinyint
否
0为未通过1为通过2为未审核
系统通知表(system_info)
字段
描述
类型
允许为空
备注
id
编号
Int
否
PK(主键)
title
通知标题
varchar(40)
否
content
通知内容
varchar(400)
否
create_time
创建时间
datetime
否
update_time
修改时间
datetime
否
admin_id
创建人id
int
否
FK(外键)
管理员表(admin)
字段
描述
类型
允许为空
备注
id
编号
Int
否
PK(主键)
登录账号
varchar(40)
否
password
密码
varchar(32)
否
photo
头像
varchar(100)
是
name
姓名
varchar(25)
否
phone
电话号码
varchar(11)
否
state
状态
tinyint
否
0为禁用 1为启用
role
角色权限
tinyint
否
0为普通管理员 1为超级管理员
社团费用记录表(club_fee)
字段
描述
类型
允许为空
备注
id
编号
Int
否
PK(主键)
club_id
社团id
int
否
FK(外键)
fee_name
费用名称
varchar(120)
否
fee_size
费用金额
varchar(20)
否
create_time
创建时间
datetime
否
update_time
修改时间
datetime
否
note
备注
varchar(400)
是
社团活动申请表(activity_apply)
字段
描述
类型
允许为空
备注
id
编号
Int
否
PK(主键)
user_id
申请人id
int
否
FK(外键)
club_id
社团ID
int
否
FK(外键)
send_time
申请时间
datetime
否
name
活动名称
varchar(40)
否
content
活动内容
varchar(1000)
否
photo
活动宣传图片
varchar(100)
否
start_time
活动开始时间
datetime
否
end_time
活动结束时间
datetime
否
address
活动地址
varchar(100)
否
first_state
第一次审核状态
tinyint
否
0为未通过1为已通过 2为未审核
second_state
第二次审核状态
tinyint
否
0为未通过1为已通过 2为未审核
社团活动表(activity)
字段
描述
类型
允许为空
备注
id
编号
Int
否
PK(主键)
name
活动名称
varchar(40)
否
club_id
社团id
int
否
FK(外键)
content
活动内容
varchar(1000)
否
photo
活动宣传图片
varchar(100)
否
start_time
活动开始时间
datetime
否
end_time
活动结束时间
datetime
否
address
活动地址
varchar(100)
否
user_id
发起人id
int
否
FK(外键)
join_people_count
活动参加人数
int(20)
否
state
活动状态
tinyint
否
0为结束 1为开始 2为未开始
用户活动关系表(user_activity)
字段
描述
类型
允许为空
备注
id
编号
Int
否
PK(主键)
user_id
用户id
int
否
FK(外键)
activity_id
活动id
int
否
FK(外键)
社团分类表(club_category)
字段
描述
类型
允许为空
备注
id
编号
Int
否
PK(主键)
name
分类名称
varchar(20)
否
note
备注
varchar(100)
是
- Sql
- /*
- Navicat Premium Data Transfer
- Source Server : localhost_3306
- Source Server Type : MySQL
- Source Server Version : 80031
- Source Host : localhost:3306
- Source Schema : club
- Target Server Type : MySQL
- Target Server Version : 80031
- File Encoding : 65001
- Date: 27/11/2023 11:09:54
- */
- SET NAMES utf8mb4;
- SET FOREIGN_KEY_CHECKS = 0;
- -- Table structure for activity
- DROP TABLE IF EXISTS
activity
; - CREATE TABLE
activity
( id
int(0) NOT NULL AUTO_INCREMENT,name
varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,club_id
int(0) NOT NULL,content
varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,photo
varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,start_time
datetime(0) NOT NULL,end_time
datetime(0) NOT NULL,address
varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,user_id
int(0) NOT NULL,join_people_count
int(0) NOT NULL,state
tinyint(0) NOT NULL,- PRIMARY KEY (
id
) USING BTREE, - INDEX
club_id
(club_id
) USING BTREE, - INDEX
user_id
(user_id
) USING BTREE, - CONSTRAINT
activity_ibfk_1
FOREIGN KEY (club_id
) REFERENCESclub
(id
) ON DELETE RESTRICT ON UPDATE RESTRICT, - CONSTRAINT
activity_ibfk_2
FOREIGN KEY (user_id
) REFERENCESuser
(id
) ON DELETE RESTRICT ON UPDATE RESTRICT - ) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
- -- Records of activity
- INSERT INTO
activity
VALUES (1, '活动1', 1, '活动1的内容', 'activity1.jpg', '2023-11-17 10:00:00', '2023-11-17 12:00:00', '地址1', 1, 2, 2); - INSERT INTO
activity
VALUES (2, '活动2', 1, '活动2的内容', 'activity2.jpg', '2023-11-18 13:00:00', '2023-11-18 15:00:00', '地址2', 2, 1, 2); - INSERT INTO
activity
VALUES (3, '活动3', 2, '活动3的内容', 'activity3.jpg', '2023-11-19 14:00:00', '2023-11-19 16:00:00', '地址3', 3, 1, 2); - INSERT INTO
activity
VALUES (4, '活动4', 2, '活动4的内容', 'activity4.jpg', '2023-11-20 15:00:00', '2023-11-20 17:00:00', '地址4', 4, 1, 2); - INSERT INTO
activity
VALUES (5, '活动5', 3, '活动5的内容', 'activity5.jpg', '2023-11-21 16:00:00', '2023-11-21 18:00:00', '地址5', 5, 1, 2);
- -- Table structure for activity_apply
- DROP TABLE IF EXISTS
activity_apply
; - CREATE TABLE
activity_apply
( id
int(0) NOT NULL AUTO_INCREMENT,user_id
int(0) NOT NULL,club_id
int(0) NOT NULL,send_time
datetime(0) NOT NULL,first_state
tinyint(0) NOT NULL,second_state
tinyint(0) NOT NULL,name
varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,content
varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,photo
varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,start_time
datetime(0) NOT NULL,end_time
datetime(0) NOT NULL,address
varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,- PRIMARY KEY (
id
) USING BTREE, - INDEX
user_id
(user_id
) USING BTREE, - INDEX
club_id
(club_id
) USING BTREE, - CONSTRAINT
activity_apply_ibfk_1
FOREIGN KEY (user_id
) REFERENCESuser
(id
) ON DELETE RESTRICT ON UPDATE RESTRICT, - CONSTRAINT
activity_apply_ibfk_2
FOREIGN KEY (club_id
) REFERENCESclub
(id
) ON DELETE RESTRICT ON UPDATE RESTRICT - ) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
- -- Records of activity_apply
- INSERT INTO
activity_apply
VALUES (1, 1, 1, '2023-11-17 10:00:00', 0, 0, '活动1', '活动1的内容', 'activity1.jpg', '2023-11-17 10:00:00', '2023-11-17 12:00:00', '地址1'); - INSERT INTO
activity_apply
VALUES (2, 2, 1, '2023-11-18 11:00:00', 0, 0, '活动2', '活动2的内容', 'activity2.jpg', '2023-11-18 13:00:00', '2023-11-18 15:00:00', '地址2'); - INSERT INTO
activity_apply
VALUES (3, 3, 2, '2023-11-19 12:00:00', 0, 0, '活动3', '活动3的内容', 'activity3.jpg', '2023-11-19 14:00:00', '2023-11-19 16:00:00', '地址3'); - INSERT INTO
activity_apply
VALUES (4, 4, 2, '2023-11-20 13:00:00', 0, 0, '活动4', '活动4的内容', 'activity4.jpg', '2023-11-20 15:00:00', '2023-11-20 17:00:00', '地址4'); - INSERT INTO
activity_apply
VALUES (5, 5, 3, '2023-11-21 14:00:00', 0, 0, '活动5', '活动5的内容', 'activity5.jpg', '2023-11-21 16:00:00', '2023-11-21 18:00:00', '地址5'); - INSERT INTO
activity_apply
VALUES (6, 2, 2, '2023-11-21 22:29:32', 1, 2, '劳动最光荣', '我爱劳动,劳动最光荣', 'abc.jpg', '2023-11-30 10:00:00', '2023-12-21 10:00:00', '操场'); - INSERT INTO
activity_apply
VALUES (7, 2, 2, '2023-11-24 16:32:59', 1, 2, '劳动最光荣', '我爱劳动,劳动最光荣', 'abc.jpg', '2023-11-30 10:00:00', '2023-12-21 10:00:00', '操场');
- -- Table structure for admin
- DROP TABLE IF EXISTS
admin
; - CREATE TABLE
admin
( id
int(0) NOT NULL AUTO_INCREMENT,email
varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,password
varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,photo
varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,name
varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,phone
varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,state
tinyint(0) NOT NULL,role
tinyint(0) NOT NULL,- PRIMARY KEY (
id
) USING BTREE - ) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
- -- Records of admin
- INSERT INTO
admin
VALUES (1, 'admin1@qq.com', 'e10adc3949ba59abbe56e057f20f883e', 'admin1.jpg', '管理员1', '12345678901', 1, 1); - INSERT INTO
admin
VALUES (2, 'admin2@qq.com', 'e10adc3949ba59abbe56e057f20f883e', 'admin2.jpg', '管理员2', '12345678902', 1, 0); - INSERT INTO
admin
VALUES (3, 'admin3@qq.com', 'e10adc3949ba59abbe56e057f20f883e', 'admin3.jpg', '管理员3', '12345678903', 1, 0); - INSERT INTO
admin
VALUES (4, 'admin4@qq.com', 'e10adc3949ba59abbe56e057f20f883e', 'admin4.jpg', '管理员4', '12345678904', 1, 0); - INSERT INTO
admin
VALUES (5, 'admin5@qq.com', 'e10adc3949ba59abbe56e057f20f883e', 'admin5.jpg', '管理员5', '12345678905', 1, 0);
- -- Table structure for club
- DROP TABLE IF EXISTS
club
; - CREATE TABLE
club
( id
int(0) NOT NULL AUTO_INCREMENT,name
varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,introduction
varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,category_id
int(0) NOT NULL,member_count
int(0) NOT NULL,create_time
datetime(0) NOT NULL,update_time
datetime(0) NOT NULL,admin_id
int(0) NOT NULL,user_id
int(0) NOT NULL,state
tinyint(0) NOT NULL,photo
varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,- PRIMARY KEY (
id
) USING BTREE, - INDEX
category_id
(category_id
) USING BTREE, - INDEX
admin_id
(admin_id
) USING BTREE, - INDEX
user_id
(user_id
) USING BTREE, - CONSTRAINT
club_ibfk_1
FOREIGN KEY (category_id
) REFERENCESclub_category
(id
) ON DELETE RESTRICT ON UPDATE RESTRICT, - CONSTRAINT
club_ibfk_2
FOREIGN KEY (admin_id
) REFERENCESadmin
(id
) ON DELETE RESTRICT ON UPDATE RESTRICT, - CONSTRAINT
club_ibfk_3
FOREIGN KEY (user_id
) REFERENCESuser
(id
) ON DELETE RESTRICT ON UPDATE RESTRICT - ) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
- -- Records of club
- INSERT INTO
club
VALUES (1, '1社', '我们社团是一个开放,和谐的社团', 1, 100, '2023-11-17 10:00:00', '2023-11-26 22:04:17', 1, 1, 1, 'https://bigeventmy.oss-cn-chengdu.aliyuncs.com/d35e0e27-49b6-49a2-958d-1b9840aa429e.png'); - INSERT INTO
club
VALUES (2, '2社', '我们社团是一个开放,和谐的社团', 2, 120, '2023-11-18 10:00:00', '2023-11-26 16:47:09', 2, 2, 1, 'https://bigeventmy.oss-cn-chengdu.aliyuncs.com/d35e0e27-49b6-49a2-958d-1b9840aa429e.png'); - INSERT INTO
club
VALUES (3, '3社', '我们社团是一个开放,和谐的社团', 3, 150, '2023-11-19 10:00:00', '2023-11-26 16:47:09', 3, 3, 1, 'https://bigeventmy.oss-cn-chengdu.aliyuncs.com/d35e0e27-49b6-49a2-958d-1b9840aa429e.png'); - INSERT INTO
club
VALUES (4, '4社', '我们社团是一个开放,和谐的社团', 4, 180, '2023-11-20 10:00:00', '2023-11-26 16:47:09', 4, 4, 1, 'https://bigeventmy.oss-cn-chengdu.aliyuncs.com/d35e0e27-49b6-49a2-958d-1b9840aa429e.png'); - INSERT INTO
club
VALUES (5, '5社', '我们社团是一个开放,和谐的社团', 5, 200, '2023-11-21 10:00:00', '2023-11-26 16:47:09', 5, 5, 1, 'https://bigeventmy.oss-cn-chengdu.aliyuncs.com/d35e0e27-49b6-49a2-958d-1b9840aa429e.png'); - INSERT INTO
club
VALUES (9, '魔术社', '我们社团是一个开放,和谐的社团', 5, 1, '2023-11-25 22:50:44', '2023-11-26 18:02:08', 1, 6, 1, 'https://bigeventmy.oss-cn-chengdu.aliyuncs.com/d35e0e27-49b6-49a2-958d-1b9840aa429e.png');
- -- Table structure for club_apply
- DROP TABLE IF EXISTS
club_apply
; - CREATE TABLE
club_apply
( id
int(0) NOT NULL AUTO_INCREMENT,user_id
int(0) NOT NULL,club_id
int(0) NOT NULL,send_time
datetime(0) NOT NULL,apply_reason
varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,state
tinyint(0) NOT NULL,- PRIMARY KEY (
id
) USING BTREE, - INDEX
user_id
(user_id
) USING BTREE, - INDEX
club_id
(club_id
) USING BTREE, - CONSTRAINT
club_apply_ibfk_1
FOREIGN KEY (user_id
) REFERENCESuser
(id
) ON DELETE RESTRICT ON UPDATE RESTRICT, - CONSTRAINT
club_apply_ibfk_2
FOREIGN KEY (club_id
) REFERENCESclub
(id
) ON DELETE RESTRICT ON UPDATE RESTRICT - ) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
- -- Records of club_apply
- INSERT INTO
club_apply
VALUES (1, 1, 1, '2023-11-17 10:00:00', '申请加入社团1的理由', 1); - INSERT INTO
club_apply
VALUES (2, 2, 1, '2023-11-18 10:00:00', '申请加入社团1的理由', 1); - INSERT INTO
club_apply
VALUES (4, 4, 2, '2023-11-20 10:00:00', '申请加入社团2的理由', 1); - INSERT INTO
club_apply
VALUES (5, 5, 3, '2023-11-21 10:00:00', '申请加入社团3的理由', 1); - INSERT INTO
club_apply
VALUES (6, 2, 1, '2023-11-21 10:10:00', '我想加入该社团', 1);
- -- Table structure for club_category
- DROP TABLE IF EXISTS
club_category
; - CREATE TABLE
club_category
( id
int(0) NOT NULL AUTO_INCREMENT,name
varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,note
varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,- PRIMARY KEY (
id
) USING BTREE - ) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
- -- Records of club_category
- INSERT INTO
club_category
VALUES (1, '人文', NULL); - INSERT INTO
club_category
VALUES (2, '类别2', '类别2的备注'); - INSERT INTO
club_category
VALUES (3, '类别3', '类别3的备注'); - INSERT INTO
club_category
VALUES (4, '类别4', '类别4的备注'); - INSERT INTO
club_category
VALUES (5, '类别5', '类别5的备注');
- -- Table structure for club_fee
- DROP TABLE IF EXISTS
club_fee
; - CREATE TABLE
club_fee
( id
int(0) NOT NULL AUTO_INCREMENT,club_id
int(0) NOT NULL,fee_name
varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,fee_size
varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,create_time
datetime(0) NOT NULL,update_time
datetime(0) NOT NULL,note
varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,- PRIMARY KEY (
id
) USING BTREE, - INDEX
club_id
(club_id
) USING BTREE, - CONSTRAINT
club_fee_ibfk_1
FOREIGN KEY (club_id
) REFERENCESclub
(id
) ON DELETE RESTRICT ON UPDATE RESTRICT - ) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
- -- Records of club_fee
- INSERT INTO
club_fee
VALUES (1, 1, '会费1', '100', '2023-11-17 10:00:00', '2023-11-17 10:00:00', '会费1的备注'); - INSERT INTO
club_fee
VALUES (2, 2, '会费2', '200', '2023-11-18 10:00:00', '2023-11-18 10:00:00', '会费2的备注'); - INSERT INTO
club_fee
VALUES (3, 3, '会费3', '300', '2023-11-19 10:00:00', '2023-11-19 10:00:00', '会费3的备注'); - INSERT INTO
club_fee
VALUES (4, 4, '会费4', '400', '2023-11-20 10:00:00', '2023-11-20 10:00:00', '会费4的备注'); - INSERT INTO
club_fee
VALUES (5, 5, '会费5', '500', '2023-11-21 10:00:00', '2023-11-21 10:00:00', '会费5的备注');
- -- Table structure for leave_info
- DROP TABLE IF EXISTS
leave_info
; - CREATE TABLE
leave_info
( id
int(0) NOT NULL AUTO_INCREMENT,content
varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,user_id
int(0) NOT NULL,send_time
datetime(0) NOT NULL,state
tinyint(0) NOT NULL,- PRIMARY KEY (
id
) USING BTREE, - INDEX
user_id
(user_id
) USING BTREE, - CONSTRAINT
leave_info_ibfk_1
FOREIGN KEY (user_id
) REFERENCESuser
(id
) ON DELETE RESTRICT ON UPDATE RESTRICT - ) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
- -- Records of leave_info
- INSERT INTO
leave_info
VALUES (1, '请假信息1', 1, '2023-11-17 10:00:00', 0); - INSERT INTO
leave_info
VALUES (2, '请假信息2', 1, '2023-11-18 10:00:00', 0); - INSERT INTO
leave_info
VALUES (3, '请假信息3', 2, '2023-11-19 10:00:00', 0); - INSERT INTO
leave_info
VALUES (4, '请假信息4', 2, '2023-11-20 10:00:00', 0); - INSERT INTO
leave_info
VALUES (5, '请假信息5', 3, '2023-11-21 10:00:00', 0); - INSERT INTO
leave_info
VALUES (6, '没啥事我就是想给管理员聊天', 2, '2023-11-22 17:18:23', 0); - INSERT INTO
leave_info
VALUES (7, '没啥事我就是想给管理员聊天凄凄切切', 2, '2023-11-22 23:29:35', 0);
- -- Table structure for system_info
- DROP TABLE IF EXISTS
system_info
; - CREATE TABLE
system_info
( id
int(0) NOT NULL AUTO_INCREMENT,title
varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,content
varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,create_time
datetime(0) NOT NULL,update_time
datetime(0) NOT NULL,admin_id
int(0) NOT NULL,- PRIMARY KEY (
id
) USING BTREE, - INDEX
admin_id
(admin_id
) USING BTREE, - CONSTRAINT
system_info_ibfk_1
FOREIGN KEY (admin_id
) REFERENCESadmin
(id
) ON DELETE RESTRICT ON UPDATE RESTRICT - ) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
- -- Records of system_info
- INSERT INTO
system_info
VALUES (1, '系统消息1', '系统消息1的内容', '2023-11-17 10:00:00', '2023-11-17 10:00:00', 1); - INSERT INTO
system_info
VALUES (2, '系统消息2', '系统消息2的内容', '2023-11-18 10:00:00', '2023-11-18 10:00:00', 2); - INSERT INTO
system_info
VALUES (3, '系统消息3', '系统消息3的内容', '2023-11-19 10:00:00', '2023-11-19 10:00:00', 3); - INSERT INTO
system_info
VALUES (4, '系统消息4', '系统消息4的内容', '2023-11-20 10:00:00', '2023-11-20 10:00:00', 4); - INSERT INTO
system_info
VALUES (5, '系统消息5', '系统消息5的内容', '2023-11-21 10:00:00', '2023-11-21 10:00:00', 5);
- -- Table structure for user
- DROP TABLE IF EXISTS
user
; - CREATE TABLE
user
( id
int(0) NOT NULL AUTO_INCREMENT,name
varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,password
varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,photo
varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,phone
char(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,email
varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,create_time
datetime(0) NOT NULL,update_time
datetime(0) NOT NULL,state
tinyint(0) NOT NULL,gender
varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,- PRIMARY KEY (
id
) USING BTREE, - UNIQUE INDEX
email
(email
) USING BTREE, - UNIQUE INDEX
phone
(phone
) USING BTREE - ) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
- -- Records of user
- INSERT INTO
user
VALUES (1, '李四一', '508df4cb2f4d8f80519256258cfb975f', 'https://bigeventmy.oss-cn-chengdu.aliyuncs.com/aeecda3f-fcb0-4011-a3dd-5efdcbedebcd.jpg', '17828029118', '3191069@qq.com', '2023-11-17 10:00:00', '2023-11-25 21:49:25', 1, '男'); - INSERT INTO
user
VALUES (2, '用户二', 'e10adc3949ba59abbe56e057f20f883e', 'https://bigeventmy.oss-cn-chengdu.aliyuncs.com/aeecda3f-fcb0-4011-a3dd-5efdcbedebcd.jpg', '17828029112', 'user2@example.com', '2023-11-18 10:00:00', '2023-11-24 16:50:06', 1, '男'); - INSERT INTO
user
VALUES (3, '用户3', 'e10adc3949ba59abbe56e057f20f883e', 'https://bigeventmy.oss-cn-chengdu.aliyuncs.com/aeecda3f-fcb0-4011-a3dd-5efdcbedebcd.jpg', '12345678903', 'user3@example.com', '2023-11-19 10:00:00', '2023-11-19 10:00:00', 1, '男'); - INSERT INTO
user
VALUES (4, '用户4', 'e10adc3949ba59abbe56e057f20f883e', 'https://bigeventmy.oss-cn-chengdu.aliyuncs.com/aeecda3f-fcb0-4011-a3dd-5efdcbedebcd.jpg', '12345678904', 'user4@example.com', '2023-11-20 10:00:00', '2023-11-20 10:00:00', 1, '女'); - INSERT INTO
user
VALUES (5, '用户5', 'e10adc3949ba59abbe56e057f20f883e', 'https://bigeventmy.oss-cn-chengdu.aliyuncs.com/aeecda3f-fcb0-4011-a3dd-5efdcbedebcd.jpg', '12345678905', 'user5@example.com', '2023-11-21 10:00:00', '2023-11-21 10:00:00', 1, '男'); - INSERT INTO
user
VALUES (6, '张三', 'e10adc3949ba59abbe56e057f20f883e', 'https://bigeventmy.oss-cn-chengdu.aliyuncs.com/aeecda3f-fcb0-4011-a3dd-5efdcbedebcd.jpg', '13568920777', '2326403483@qq.com', '2023-11-20 20:06:24', '2023-11-20 20:06:24', 1, '男'); - INSERT INTO
user
VALUES (7, '张三', 'e10adc3949ba59abbe56e057f20f883e', 'https://bigeventmy.oss-cn-chengdu.aliyuncs.com/aeecda3f-fcb0-4011-a3dd-5efdcbedebcd.jpg', NULL, '2326403480@qq.com', '2023-11-22 22:57:08', '2023-11-22 22:57:08', 1, '男');
- -- Table structure for user_activity
- DROP TABLE IF EXISTS
user_activity
; - CREATE TABLE
user_activity
( id
int(0) NOT NULL AUTO_INCREMENT,user_id
int(0) NOT NULL,activity_id
int(0) NOT NULL,- PRIMARY KEY (
id
) USING BTREE, - INDEX
user_id
(user_id
) USING BTREE, - INDEX
activity_id
(activity_id
) USING BTREE, - CONSTRAINT
user_activity_ibfk_1
FOREIGN KEY (user_id
) REFERENCESuser
(id
) ON DELETE RESTRICT ON UPDATE RESTRICT, - CONSTRAINT
user_activity_ibfk_2
FOREIGN KEY (activity_id
) REFERENCESactivity
(id
) ON DELETE RESTRICT ON UPDATE RESTRICT - ) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
- -- Records of user_activity
- INSERT INTO
user_activity
VALUES (1, 1, 1); - INSERT INTO
user_activity
VALUES (2, 2, 2); - INSERT INTO
user_activity
VALUES (4, 4, 4); - INSERT INTO
user_activity
VALUES (5, 5, 5); - INSERT INTO
user_activity
VALUES (7, 2, 1); - INSERT INTO
user_activity
VALUES (8, 3, 3);
- -- Table structure for user_club
- DROP TABLE IF EXISTS
user_club
; - CREATE TABLE
user_club
( id
int(0) NOT NULL AUTO_INCREMENT,user_id
int(0) NOT NULL,club_id
int(0) NOT NULL,role
tinyint(0) NOT NULL,join_time
datetime(0) NOT NULL,- PRIMARY KEY (
id
) USING BTREE, - INDEX
user_id
(user_id
) USING BTREE, - INDEX
club_id
(club_id
) USING BTREE, - CONSTRAINT
user_club_ibfk_1
FOREIGN KEY (user_id
) REFERENCESuser
(id
) ON DELETE RESTRICT ON UPDATE RESTRICT, - CONSTRAINT
user_club_ibfk_2
FOREIGN KEY (club_id
) REFERENCESclub
(id
) ON DELETE RESTRICT ON UPDATE RESTRICT - ) ENGINE = InnoDB AUTO_INCREMENT = 20 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
- -- Records of user_club
- INSERT INTO
user_club
VALUES (1, 1, 1, 1, '2023-11-17 10:00:00'); - INSERT INTO
user_club
VALUES (2, 2, 2, 1, '2023-11-18 10:00:00'); - INSERT INTO
user_club
VALUES (3, 3, 3, 1, '2023-11-19 10:00:00'); - INSERT INTO
user_club
VALUES (4, 4, 4, 1, '2023-11-20 10:00:00'); - INSERT INTO
user_club
VALUES (5, 5, 5, 1, '2023-11-21 10:00:00'); - INSERT INTO
user_club
VALUES (10, 7, 9, 0, '2023-11-25 22:50:43'); - INSERT INTO
user_club
VALUES (19, 6, 9, 1, '2023-11-26 18:03:24'); - SET FOREIGN_KEY_CHECKS = 1;
版权归原作者 LinZhiWei6s 所有, 如有侵权,请联系我们删除。