Files
flower-rain/docs/zzm/zzm2.md
2025-12-05 16:30:25 +08:00

118 lines
7.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
### 1. **用户表users**
> 存储所有系统用户包括求职者、企业HR、管理员等
| 字段名 | 类型 | 说明 |
|----------------|----------------|----------------------------------------------------|
| user_id | BIGINT (PK) | 用户唯一ID |
| email | VARCHAR(255) | 邮箱(唯一) |
| password | VARCHAR(255) | 加密后的密码 |
| user_type | ENUM | 类型:'job_seeker', 'company_hr', 'admin' |
| register_time | DATETIME | 注册时间 |
---
### 2. **求职人表job_seekers**
> 补充用户的求职相关信息(仅当 user_type = 'job_seeker' 时有效)
| 字段名 | 类型 | 说明 |
|-------------------|----------------|-------------------------------------------------------|
| user_id | BIGINT (PK, FK)| 关联 users.user_id |
| name | VARCHAR(100) | 姓名 |
| phone | VARCHAR(20) | 手机号 |
| work_experience | INT | 工作年限(年) |
| target_industry | VARCHAR(100) | 期待行业 |
| expected_salary | VARCHAR(50) | 期望薪资范围(如 "8k-12k" |
| education | TEXT | 教育经历可结构化为JSON或单独建表 |
| bio | TEXT | 个人简介 |
---
### 3. **公司表companies**
> 存储企业信息
| 字段名 | 类型 | 说明 |
|---------------|----------------|-----------------------------------------------|
| company_id | BIGINT (PK) | 公司唯一ID |
| company_name | VARCHAR(255) | 公司名称 |
| logo_url | VARCHAR(500) | 公司图标URL |
| description | TEXT | 公司简介 |
| industry | VARCHAR(100) | 所属行业 |
| size | VARCHAR(50) | 公司规模(如 "50-200人" |
| hr_user_id | BIGINT (FK) | 关联 HR 用户(来自 users 表) |
---
### 4. **职位表jobs**
> 企业发布的职位信息
| 字段名 | 类型 | 说明 |
|---------------|----------------|----------------------------------------------------|
| job_id | BIGINT (PK) | 职位ID |
| title | VARCHAR(255) | 职位名称 |
| description | TEXT | 职位描述 |
| requirements | TEXT | 职位要求 |
| salary_range | VARCHAR(100) | 薪资范围(如 "10k-15k" |
| location | VARCHAR(255) | 工作地点 |
| post_time | DATETIME | 发布时间 |
| company_id | BIGINT (FK) | 所属公司 |
| status | ENUM | 状态:'active', 'closed' |
---
### 5. **求职申请记录表applications**
| 字段名 | 类型 | 说明 |
|----------------|----------------|--------------------------------------------------------------|
| application_id | BIGINT (PK) | 申请ID |
| job_id | BIGINT (FK) | 职位ID |
| seeker_id | BIGINT (FK) | 求职者 user_id |
| apply_time | DATETIME | 申请时间 |
| status | ENUM | 状态:'pending', 'reviewed', 'rejected', 'interview', 'hired' |
---
### 6. **资讯分类表news_categories**
| 字段名 | 类型 | 说明 |
|--------------|--------------|----------------------------------------------------|
| category_id | INT (PK) | 分类ID |
| name | VARCHAR(100) | 分类名称(如“行业动态”、“政策解读”) |
---
### 7. **资讯文章表news_articles**
| 字段名 | 类型 | 说明 |
|---------------|---------------------|-----------------------------------------------------------|
| article_id | BIGINT (PK) | 文章ID |
| title | VARCHAR(255) | 标题 |
| summary | VARCHAR(500) | 摘要 |
| cover_image | VARCHAR(500) | 封面图URL |
| content | LONGTEXT | 正文内容 |
| category_id | INT (FK) | 所属分类 |
| author | VARCHAR(100) | 作者(可为用户名或公司名) |
| source | VARCHAR(255) | 来源(如“人社部官网”) |
| views | INT | 浏览量 |
| publish_time | DATETIME | 发布时间 |
| company_id | BIGINT (FK, NULLABLE)| 若为合作公司发布则关联公司ID |
---
### 8. **招聘会表career_fairs**
| 字段名 | 类型 | 说明 |
|---------------|----------------|---------------------------------------------------------------|
| fair_id | BIGINT (PK) | 招聘会ID |
| name | VARCHAR(255) | 招聘会名称 |
| type | VARCHAR(100) | 类型(线上/线下/混合) |
| start_time | DATETIME | 开始时间 |
| end_time | DATETIME | 结束时间 |
| venue | VARCHAR(255) | 举办地点(线下地址或线上链接) |
| entry_url | VARCHAR(500) | 入口链接 |
| poster_url | VARCHAR(500) | 海报图片URL |
| description | TEXT | 详细描述 |
| organizer | VARCHAR(255) | 主办方 |
| status | ENUM | 状态:'upcoming', 'ongoing', 'ended' |
| created_by | BIGINT (FK) | 创建者(管理员或合作公司 user_id |