<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class module extends BaseModel
{
    use HasFactory;

    protected $fillable = [
        'name',
        'slug',
        'status',
        'image',
    ];

    protected $with = ['subModules'];

    public function subModules()
    {
        return $this->hasMany(SubModule::class, 'module_id', 'id');
    }
}
