You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
6.1 KiB
6.1 KiB
school_person_course_schedule 表文档
表概述
表名: school_person_course_schedule
功能: 人员课程排课表,用于管理学员、教师等人员的课程安排和时间分配,包括课程状态跟踪、请假管理、补课安排等,支持多种课程类型和人员类型,为学校提供完整的排课管理和教学调度功能
字段说明
Field Type Collation Null Key Default Extra Privileges Comment
id int NULL NO PRI NULL auto_increment select,insert,update,references 关系编号
resources_id int NULL YES NULL select,insert,update,references 资源ID
person_id int NULL YES NULL select,insert,update,references 人员ID
student_id int NULL YES NULL select,insert,update,references 学员ID
person_type enum('student','customer_resource') utf8mb4_general_ci NO NULL select,insert,update,references 人员类型: student-正式学员, customer_resource-客户资源,teacher教练
schedule_id int NULL NO MUL NULL select,insert,update,references 课程安排ID
course_date date NULL NO NULL select,insert,update,references 上课日期
schedule_type tinyint(1) NULL YES NULL select,insert,update,references 课程安排类型1临时课2固定课
course_type tinyint(1) NULL YES NULL select,insert,update,references 课程类型1加课2补课3 等待位
time_slot varchar(255) utf8mb4_general_ci NO NULL select,insert,update,references 上课时段
created_at timestamp NULL YES CURRENT_TIMESTAMP DEFAULT_GENERATED select,insert,update,references 创建时间
updated_at timestamp NULL YES CURRENT_TIMESTAMP DEFAULT_GENERATED on update CURRENT_TIMESTAMP select,insert,update,references 更新时间
deleted_at int NULL YES 0 select,insert,update,references 删除
status tinyint(1) NULL NO 0 select,insert,update,references 状态0待上课1已上课2请假
remark varchar(512) utf8mb4_general_ci YES NULL select,insert,update,references 请假备注
student_course_id int NULL YES NULL select,insert,update,references 学员课程ID(关联到student_courses表)
cancel_reason varchar(255) utf8mb4_general_ci YES NULL select,insert,update,references 取消预约原因
功能用途
主要功能
- 课程排课管理: 管理学员和教师的课程安排和时间分配
- 人员类型区分: 支持学员、客户资源、教师等不同人员类型的排课
- 课程状态跟踪: 跟踪课程的待上课、已上课、请假等状态
- 时间段管理: 精确管理每个课程的上课日期和时间段
- 课程类型分类: 区分临时课、固定课、加课、补课等不同类型
- 请假管理: 处理学员请假申请和备注信息
- 取消预约: 管理课程取消和取消原因记录
- 资源关联: 关联教学资源和学员课程信息
业务场景
- 日常排课: 为学员安排日常的固定课程和临时课程
- 补课安排: 处理因请假或其他原因需要补课的安排
- 加课服务: 为需要额外辅导的学员安排加课
- 请假处理: 处理学员的请假申请和课程调整
- 教师排课: 为教师安排教学时间和课程分配
- 资源调度: 协调教室、设备等教学资源的使用
- 课程统计: 统计学员的上课情况和教师的工作量
- 排课冲突检测: 检测和避免时间冲突的课程安排
- 等待位管理: 管理课程的等待位和候补安排
关联关系
主要关联表
- school_schedule: 课程安排表,关联具体的课程安排信息
- school_member: 学员表,关联参与课程的学员信息
- school_personnel: 人员表,关联教师和其他人员信息
- school_customer_resources: 客户资源表,关联潜在客户信息
- school_student_courses: 学员课程表,关联学员的课程购买信息
- school_course: 课程表,关联课程的基本信息
- school_classroom: 教室表,关联上课地点信息
- school_resources: 资源表,关联教学资源信息
关联说明
schedule_id关联school_schedule.id,标识具体的课程安排person_id关联school_personnel.id,标识参与人员(如教师)student_id关联school_member.id,标识参与的学员resources_id关联school_resources.id,标识使用的教学资源student_course_id关联school_student_courses.id,标识学员的课程购买记录person_type字段区分不同类型的参与人员- 与考勤系统关联,记录实际的上课出勤情况
- 与通知系统关联,发送课程提醒和变更通知
索引建议
- 主键索引:
PRIMARY KEY (id)- 自动创建 - 课程安排索引:
INDEX idx_schedule_id (schedule_id)- 支持按课程安排查询 - 人员索引:
INDEX idx_person_id (person_id)- 支持按人员查询 - 学员索引:
INDEX idx_student_id (student_id)- 支持按学员查询 - 日期索引:
INDEX idx_course_date (course_date)- 支持按上课日期查询 - 状态索引:
INDEX idx_status (status)- 支持按课程状态查询 - 人员类型索引:
INDEX idx_person_type (person_type)- 支持按人员类型查询 - 课程类型索引:
INDEX idx_course_type (course_type)- 支持按课程类型查询 - 复合索引:
INDEX idx_schedule_date (schedule_id, course_date)- 支持课程安排和日期的复合查询 - 时间段索引:
INDEX idx_date_time (course_date, time_slot)- 支持日期和时间段的复合查询
注意事项
- 时间冲突检测: 严格检测同一人员在同一时间段的课程冲突
- 状态一致性: 确保课程状态与实际上课情况保持一致
- 请假流程: 建立完善的请假申请和审批流程
- 补课机制: 建立合理的补课安排和补课次数限制
- 资源占用: 合理管理教学资源的占用和释放
- 数据完整性: 确保人员、课程、时间等关键信息的完整性
- 权限控制: 严格控制排课数据的查看和修改权限
- 历史记录: 保留课程变更的历史记录,便于追溯
- 通知机制: 及时通知相关人员课程安排的变更
- 统计准确性: 确保课程统计数据的准确性和实时性