2024-07-18 00:25:58 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace app\common\model;
|
|
|
|
|
|
|
|
use app\BaseModel;
|
|
|
|
use support\Model;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* wa_teacher_free_time 教师空闲时间
|
|
|
|
* @property integer $id (主键)
|
|
|
|
* @property integer $teacher_id 教师
|
|
|
|
* @property string $date 日期
|
|
|
|
* @property string $time 时间
|
|
|
|
* @property mixed $hour 课时
|
|
|
|
* @property string $start_time 开始时间
|
|
|
|
* @property string $end_time 结束时间
|
|
|
|
* @property string $month 月份
|
|
|
|
* @property integer $subject_id 课程id
|
|
|
|
* @property integer $is_publish 是否发布
|
|
|
|
* @property mixed $created_at 创建时间
|
|
|
|
* @property string $updated_at 更新时间
|
|
|
|
* @property string $deleted_at
|
|
|
|
*/
|
|
|
|
class TeacherFreeTime extends BaseModel
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
public function teacher()
|
|
|
|
{
|
|
|
|
return $this->hasOne(Teacher::class,'id','teacher_id')->bind(['teacher_name','teacher_account'=>"account"]);
|
|
|
|
}
|
|
|
|
|
2024-07-21 18:13:26 +08:00
|
|
|
/**
|
|
|
|
* @desc 教师排课时间
|
|
|
|
* @return \think\model\relation\HasMany
|
|
|
|
*/
|
|
|
|
public function teacherScheduleTime()
|
|
|
|
{
|
|
|
|
return $this->hasMany(TeacherScheduleTime::class,'free_time_id','id');
|
|
|
|
}
|
|
|
|
|
2024-07-18 00:25:58 +08:00
|
|
|
}
|