<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

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

    public function subject()
    {
        return $this->belongsTo(Subject::class);
    }
}
