<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

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

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