course/app/common/model/TeacherScheduleTime.php
2024-07-15 23:51:01 +08:00

47 lines
1.0 KiB
PHP

<?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 string $hour 课时
* @property mixed $created_at 创建时间
* @property string $updated_at 更新时间
* @property string $deleted_at
*/
class TeacherScheduleTime extends BaseModel
{
public function teacher()
{
return $this->hasOne(Teacher::class, 'id', 'teacher_id')->bind([
'teacher_account' => 'account',
'teacher_name',
'time_zone_name'
]);
}
public function teacherAttr()
{
return $this->hasOne(Teacher::class, 'id', 'teacher_id');
}
public function subject()
{
return $this->hasOne(Subject::class, 'id', 'subject_id')->bind(['subject_name', 'english_name']);
}
public function subjectArr()
{
return $this->hasOne(Subject::class, 'id', 'subject_id');
}
}