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