<?php

namespace App\Models;

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

class Modulo extends Model
{
    use HasFactory;
    use SoftDeletes;
    protected $dates = ['deleted_at'];
    protected $fillable = ['quantidadecelulas','numeromodulo','configuracaomodulos_id','corredor_id','usuario_id'];

    public function getCorredor()
    {
        return $this->belongsTo(Corredor::class,'corredor_id', 'id');
    }
    public function getConfiguracao()
    {
        return $this->belongsTo(configuracaoModulo::class,'configuracaomodulos_id', 'id');
    }
     public function getCelulas(){
        return $this->hasMany(Celula::class);
    }

}
