<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Module extends Model
{
    protected $fillable = ['course_id', 'name', 'order'];

    public function course()
    {
        return $this->belongsTo(Course::class);
    }

    public function lessonSections()
    {
        return $this->hasMany(LessonSection::class)->orderBy('order');
    }
}
