代码拉取完成,页面将自动刷新
/*
Navicat Premium Data Transfer
Source Server : localhost_3306
Source Server Type : MySQL
Source Server Version : 80037 (8.0.37)
Source Host : localhost:3306
Source Schema : xyzhaopin
Target Server Type : MySQL
Target Server Version : 80037 (8.0.37)
File Encoding : 65001
Date: 14/06/2024 22:07:03
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for announcements
-- ----------------------------
DROP TABLE IF EXISTS `announcements`;
CREATE TABLE `announcements` (
`announcement_id` int NOT NULL AUTO_INCREMENT COMMENT '公告ID,主键,自增',
`title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '标题',
`content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '内容',
`posted_by` int NULL DEFAULT NULL COMMENT '发布者ID',
`posted_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '发布日期,默认当前时间',
PRIMARY KEY (`announcement_id`) USING BTREE,
INDEX `posted_by`(`posted_by` ASC) USING BTREE,
CONSTRAINT `announcements_ibfk_1` FOREIGN KEY (`posted_by`) REFERENCES `users` (`user_id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '公告表,存储系统公告的信息' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Table structure for applications
-- ----------------------------
DROP TABLE IF EXISTS `applications`;
CREATE TABLE `applications` (
`application_id` int NOT NULL AUTO_INCREMENT COMMENT '申请ID,主键,自增',
`job_id` int NULL DEFAULT NULL COMMENT '职位ID',
`student_id` int NULL DEFAULT NULL COMMENT '学生ID',
`application_status` enum('submitted','shortlisted','interviewed','accepted','rejected') CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '申请状态(submitted:已提交,shortlisted:已入围,interviewed:已面试,accepted:已录用,rejected:已拒绝)',
`applied_at` date NULL DEFAULT NULL COMMENT '申请日期,默认当前时间',
`updated_at` date NULL DEFAULT NULL COMMENT '更新时间,默认当前时间',
PRIMARY KEY (`application_id`) USING BTREE,
INDEX `job_id`(`job_id` ASC) USING BTREE,
INDEX `student_id`(`student_id` ASC) USING BTREE,
CONSTRAINT `applications_ibfk_1` FOREIGN KEY (`job_id`) REFERENCES `jobs` (`job_id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT `applications_ibfk_2` FOREIGN KEY (`student_id`) REFERENCES `students` (`student_id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '申请表,存储学生申请职位的信息' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Table structure for companies
-- ----------------------------
DROP TABLE IF EXISTS `companies`;
CREATE TABLE `companies` (
`user_id` int NOT NULL,
`company_id` int NOT NULL AUTO_INCREMENT COMMENT '企业ID,主键,自增',
`company_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '公司名称',
`industry` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '行业',
`website` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '网站',
`description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '描述',
`contact_person` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '联系人',
`contact_email` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '联系邮箱',
`contact_phone` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '联系电话',
`address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '地址',
PRIMARY KEY (`company_id`) USING BTREE,
INDEX `user_id`(`user_id` ASC) USING BTREE,
CONSTRAINT `companies_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 25 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '企业表,存储企业的详细信息' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Table structure for events
-- ----------------------------
DROP TABLE IF EXISTS `events`;
CREATE TABLE `events` (
`event_id` int NOT NULL AUTO_INCREMENT COMMENT '活动ID,主键,自增',
`title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '标题',
`description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '描述',
`event_date` date NULL DEFAULT NULL COMMENT '活动日期',
`event_time` time NULL DEFAULT NULL,
`location` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '地点',
`organizer_id` int NULL DEFAULT NULL COMMENT '组织者ID',
`created_at` date NULL DEFAULT NULL COMMENT '创建时间,默认当前时间',
`updated_at` date NULL DEFAULT NULL COMMENT '更新时间,默认当前时间',
PRIMARY KEY (`event_id`) USING BTREE,
INDEX `organizer_id`(`organizer_id` ASC) USING BTREE,
CONSTRAINT `events_ibfk_1` FOREIGN KEY (`organizer_id`) REFERENCES `users` (`user_id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '活动表,存储活动的信息' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Table structure for feedbacks
-- ----------------------------
DROP TABLE IF EXISTS `feedbacks`;
CREATE TABLE `feedbacks` (
`feedback_id` int NOT NULL AUTO_INCREMENT COMMENT '反馈ID,主键,自增',
`user_id` int NULL DEFAULT NULL COMMENT '用户ID',
`content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '内容',
`submitted_at` date NULL DEFAULT NULL COMMENT '提交时间,默认当前时间',
`status` enum('unresolved','in progress','resolved') CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'unresolved' COMMENT '(unresolved:未解决,in progress:处理中,resolved:已解决)',
`response` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '回复',
`responded_at` date NULL DEFAULT NULL COMMENT '回复时间',
PRIMARY KEY (`feedback_id`) USING BTREE,
INDEX `user_id`(`user_id` ASC) USING BTREE,
CONSTRAINT `feedbacks_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '反馈表,存储用户反馈的信息' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Table structure for interviews
-- ----------------------------
DROP TABLE IF EXISTS `interviews`;
CREATE TABLE `interviews` (
`interview_id` int NOT NULL AUTO_INCREMENT COMMENT '面试ID,主键,自增',
`student_id` int NOT NULL COMMENT '学生ID',
`job_id` int NOT NULL COMMENT '职位ID',
`interview_date` date NOT NULL COMMENT '面试日期',
`interview_time` time NOT NULL COMMENT '面试时间',
`location` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '面试地点',
PRIMARY KEY (`interview_id`) USING BTREE,
INDEX `student_id`(`student_id` ASC) USING BTREE,
INDEX `job_id`(`job_id` ASC) USING BTREE,
CONSTRAINT `interviews_ibfk_1` FOREIGN KEY (`student_id`) REFERENCES `students` (`student_id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT `interviews_ibfk_2` FOREIGN KEY (`job_id`) REFERENCES `jobs` (`job_id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '面试表,存储面试的信息' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Table structure for jobs
-- ----------------------------
DROP TABLE IF EXISTS `jobs`;
CREATE TABLE `jobs` (
`job_id` int NOT NULL AUTO_INCREMENT COMMENT '职位ID,主键,自增',
`company_id` int NOT NULL COMMENT '公司ID',
`job_title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '职位标题',
`job_description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '职位描述',
`requirements` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '职位要求',
`location` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '工作地点',
`salary` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '薪资',
`posted_at` date NULL DEFAULT NULL COMMENT '发布日期,默认当前时间',
`deadline` date NULL DEFAULT NULL COMMENT '截止日期',
PRIMARY KEY (`job_id`) USING BTREE,
INDEX `company_id`(`company_id` ASC) USING BTREE,
CONSTRAINT `jobs_ibfk_1` FOREIGN KEY (`company_id`) REFERENCES `companies` (`company_id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '职位表,存储职位的详细信息' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Table structure for notifications
-- ----------------------------
DROP TABLE IF EXISTS `notifications`;
CREATE TABLE `notifications` (
`notification_id` int NOT NULL AUTO_INCREMENT COMMENT '通知ID,主键,自增',
`user_id` int NULL DEFAULT NULL COMMENT '接收用户ID',
`sender_id` int NULL DEFAULT NULL COMMENT '发送用户ID',
`title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '通知标题',
`message` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '通知内容',
`created_at` date NULL DEFAULT NULL COMMENT '创建时间,默认当前时间',
`read_status` enum('unread','read') CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'unread' COMMENT '读取状态(unread:未读,read:已读),默认未读',
PRIMARY KEY (`notification_id`) USING BTREE,
INDEX `user_id`(`user_id` ASC) USING BTREE,
INDEX `sender_id`(`sender_id` ASC) USING BTREE,
CONSTRAINT `notifications_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT `notifications_ibfk_2` FOREIGN KEY (`sender_id`) REFERENCES `users` (`user_id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '通知表,存储用户的通知信息' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Table structure for students
-- ----------------------------
DROP TABLE IF EXISTS `students`;
CREATE TABLE `students` (
`user_id` int NOT NULL COMMENT '用户id',
`student_id` int NOT NULL AUTO_INCREMENT COMMENT '学生ID,主键,自增',
`name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '姓名',
`dob` date NULL DEFAULT NULL COMMENT '出生日期',
`gender` enum('男','女') CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '性别',
`phone` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '电话',
`address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '地址',
`resume` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '简历',
`education` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '教育背景',
`experience` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '工作经验',
`skills` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '技能',
PRIMARY KEY (`student_id`) USING BTREE,
INDEX `user_id`(`user_id` ASC) USING BTREE,
CONSTRAINT `user_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 47 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '学生表,存储学生的详细信息' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Table structure for users
-- ----------------------------
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
`user_id` int NOT NULL AUTO_INCREMENT COMMENT '用户ID,主键,自增',
`username` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '用户名,唯一',
`password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '密码',
`email` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '电子邮件,唯一',
`role` enum('admin','student','company') CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '角色',
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间,默认当前时间',
`updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间,默认当前时间',
PRIMARY KEY (`user_id`) USING BTREE,
UNIQUE INDEX `username`(`username` ASC) USING BTREE,
UNIQUE INDEX `email`(`email` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 68 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '用户表,存储所有用户的基本信息,包括管理员、学生和企业' ROW_FORMAT = DYNAMIC;
SET FOREIGN_KEY_CHECKS = 1;
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。