12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
- namespace app\common\model;
- use think\Db;
- use think\Model;
- /**
- * 群组
- */
- class UniversityCourseApplyModel extends Model
- {
- // 表名
- protected $name = 'university_course_apply';
- // 开启自动写入时间戳字段
- protected $autoWriteTimestamp = false;
- // 定义时间戳字段名
- protected $createTime = false;
- protected $updateTime = false;
- protected $deleteTime = false;
- public function user()
- {
- return $this->hasOne(UserModel::class, 'id', 'user_id');
- }
- public function course()
- {
- return $this->hasOne(UniversityCourseModel::class, 'id', 'course_id');
- }
- public function chapters()
- {
- return $this->hasMany(UniversityCourseChapterModel::class, 'course_id', 'course_id');
- }
- }
|