<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Unit extends BaseModel
{
    public function children()
    {
        return $this->hasMany(Course::class)->orderBy('order', 'desc');
    }

    public function module()
    {
        return $this->belongsTo(Module::class);
    }
}
