You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
553 B

6 months ago
<?php
namespace App\Models;
class CoursePeriod extends SoftDeletesModel
{
public function course()
{
return $this->hasOne(Course::class, 'id', 'course_id');
}
public function teacher()
{
return $this->hasOne(Teacher::class, 'id', 'teacher_id');
}
public function courseSetting()
{
return $this->hasOne(CourseSetting::class, 'id', 'course_setting_id');
}
public function courseContents()
{
return $this->hasMany(CourseContent::class, 'course_period_id', 'id');
}
}