Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 添加了数据库建表sql文件 #10

Merged
merged 16 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions sql/interview_schedule.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
Navicat Premium Data Transfer

Source Server : 本机
Source Server Type : MySQL
Source Server Version : 80026
Source Host : localhost:3306
Source Schema : achobeta_recruitment

Target Server Type : MySQL
Target Server Version : 80026
File Encoding : 65001

Date: 17/01/2024 13:43:54
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for interview_schedule
-- ----------------------------
DROP TABLE IF EXISTS `interview_schedule`;
CREATE TABLE `interview_schedule` (
`id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
`stu_id` bigint UNSIGNED NOT NULL COMMENT '用户表id',
`date` datetime NOT NULL COMMENT '预约日期',
`start_time` datetime NOT NULL COMMENT '预约开始时间',
`end_time` datetime NOT NULL COMMENT '预约结束时间',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
`version` int NOT NULL DEFAULT 0 COMMENT '乐观锁',
`is_deleted` tinyint NOT NULL DEFAULT 0 COMMENT '伪删除标记',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `uni_stu_id`(`stu_id` ASC) USING BTREE,
INDEX `idx_date`(`date` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_bin COMMENT = '面试时间预约表' ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;
37 changes: 37 additions & 0 deletions sql/stu_attachment.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
Navicat Premium Data Transfer

Source Server : 本机
Source Server Type : MySQL
Source Server Version : 80026
Source Host : localhost:3306
Source Schema : achobeta_recruitment

Target Server Type : MySQL
Target Server Version : 80026
File Encoding : 65001

Date: 17/01/2024 13:44:01
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for stu_attachment
-- ----------------------------
DROP TABLE IF EXISTS `stu_attachment`;
CREATE TABLE `stu_attachment` (
`id` bigint UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID',
`stu_id` bigint UNSIGNED NOT NULL COMMENT '学生表主键id',
`filename` varchar(256) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT '附件名',
`attachment` varchar(256) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT '附件路径',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
`version` int NOT NULL DEFAULT 0 COMMENT '乐观锁',
`is_deleted` tinyint NOT NULL DEFAULT 0 COMMENT '伪删除标记',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `uni_stu_id`(`stu_id` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_bin COMMENT = '学生附件表' ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;
73 changes: 73 additions & 0 deletions sql/student.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
/*
Navicat Premium Data Transfer

Source Server : 本机
Source Server Type : MySQL
Source Server Version : 80026
Source Host : localhost:3306
Source Schema : achobeta_recruitment

Target Server Type : MySQL
Target Server Version : 80026
File Encoding : 65001

Date: 17/01/2024 13:44:06
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for student
-- 简历状态comment说明
-- 范围:0~14,简历状态{
# - 0-草稿
# - 1-待筛选
# - 2-筛选不通过
# - 3-待安排初试
# - 4-待初试
# - 5-初试不通过
# - 6-初试通过(仅当初试为最后一个流程时显示)
# - 7-待复试
# - 8-待安排复试
# - 9-复试通过(仅当复试为最后一个流程时显示)
# - 10-待终试
# - 11-待安排终试
# - 12-终试通过(仅当复试为最后一个流程时显示)
# - 13-待处理(反馈异常/或管理员主动设置为该状态)
# - 14-挂起(管理员可以主动设置该状态)}
-- ----------------------------
DROP TABLE IF EXISTS `student`;
CREATE TABLE `student` (
`id` bigint UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID',
`questionnaire_id` int NOT NULL DEFAULT 1 COMMENT '问卷id',
`student_id` varchar(13) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT '学号',
`name` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT '姓名',
`gender` tinyint UNSIGNED NOT NULL DEFAULT 0 COMMENT '性别',
`major` varchar(20) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT '专业',
`class` varchar(30) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT '班级',
`email` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT '邮箱',
`phone_number` varchar(11) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT '手机号码',
`reason` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '加入 AchoBeta 的理由',
`introduce` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '个人介绍(自我认知)',
`experience` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '个人经历 (项目经历、 职业规划等)',
`awards` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '获奖经历',
`image` varchar(500) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT '照片',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT '备注',
`status` int NOT NULL DEFAULT 1 COMMENT '简历状态',
`submit_count` int NOT NULL DEFAULT 0 COMMENT '提交次数',
`batch` int NOT NULL DEFAULT 1 COMMENT 'ab版本',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
`version` int NOT NULL DEFAULT 0 COMMENT '乐观锁',
`is_deleted` tinyint NOT NULL DEFAULT 0 COMMENT '伪删除标记',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `uni_questionnaire_id`(`questionnaire_id` ASC) USING BTREE,
UNIQUE INDEX `uni_student_id`(`student_id` ASC) USING BTREE,
UNIQUE INDEX `uni_email`(`email` ASC) USING BTREE,
INDEX `idx_class`(`class` ASC) USING BTREE,
INDEX `idx_major`(`major` ASC) USING BTREE,
INDEX `idx_name`(`name` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_bin COMMENT = '学生用户简历表' ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;
Loading