course/app/common/model/StudentHomework.php

57 lines
1.7 KiB
PHP
Raw Normal View History

<?php
namespace app\common\model;
use app\BaseModel;
use support\Model;
/**
* wa_student_homework
* @property integer $id (主键)
* @property integer $student_id 学生
* @property integer $teacher_homework_id 家庭作业id
* @property integer $teacher_id 教师
* @property integer $teacher_schedule_time_id 教师排课id
* @property integer $subject_id 课程id
* @property string $homework_file_url 家庭作业地址
* @property string $homework_file_name 家庭作业文件名称
* @property string $homework_version_file_url 新版本家庭作业
* @property string $homework_version_file_name 新版本家庭作业文件名称
* @property string $feedback_file_url 家庭作业反馈地址
* @property string $feedback_file_name 家庭作业反馈文件名称
* @property string $feedback_version_file_url 新版家庭作业反馈地址
* @property string $feedback_version_file_name 新版家庭作业反馈名称
* @property integer $is_publish 是否发布
* @property mixed $created_at 创建时间
* @property string $update_at 更新时间
* @property string $deleted_at
*/
class StudentHomework extends BaseModel
{
public function student()
{
return $this->hasOne(Student::class, 'id', 'student_id')->bind([
'student_name',
'student_account' => 'account'
]);
}
public function teacher()
{
return $this->hasOne(Teacher::class, 'id', 'teacher_id')->bind([
'teacher_name',
'teacher_account' => 'account'
]);
}
public function subject()
{
return $this->hasOne(Subject::class, 'id', 'subject_id')->bind([
'teacher_name',
'teacher_account' => 'account'
]);
}
}