2024-07-16 18:02:04 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace app\common\model;
|
|
|
|
|
|
|
|
use app\BaseModel;
|
|
|
|
use support\Model;
|
|
|
|
//
|
|
|
|
///**
|
|
|
|
// * wa_student_schedule 课表
|
|
|
|
// * @property integer $id (主键)
|
|
|
|
// * @property integer $student_id 学生
|
|
|
|
// * @property integer $teacher_schedule_time_id 教师排课id
|
|
|
|
// * @property mixed $teacher_schedule_time_detail 排课详情
|
|
|
|
// * @property integer $teacher_id 教师
|
|
|
|
// * @property integer $subject_id 学科
|
|
|
|
// * @property string $date_time 课程时间
|
|
|
|
// * @property string $date_start_time 课程开始时间
|
|
|
|
// * @property string $date_end_time 课程结束时间
|
|
|
|
// * @property mixed $created_at 创建时间
|
|
|
|
// * @property string $updated_at 更新时间
|
|
|
|
// * @property string $deleted_at
|
|
|
|
// */
|
|
|
|
class StudentSchedule extends BaseModel
|
|
|
|
{
|
|
|
|
|
2024-07-16 22:52:38 +08:00
|
|
|
public function teacher()
|
|
|
|
{
|
|
|
|
return $this->hasOne(Teacher::class, 'id', 'teacher_id')->bind(['teacher_account'=>'account', 'teacher_name']);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function subject()
|
|
|
|
{
|
|
|
|
return $this->hasOne(Subject::class, 'id', 'subject_id')->bind(['subject_name', 'english_name']);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function student()
|
|
|
|
{
|
|
|
|
return $this->hasOne(Student::class, 'id', 'student_id')->bind(['student_name', 'student_account'=>'account']);
|
|
|
|
}
|
|
|
|
|
2024-07-16 18:02:04 +08:00
|
|
|
}
|