<?php

namespace App\Models;

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

class transformador extends Model
{
    use HasFactory;

    protected $fillable = ['potencia', 'marca', 'serie'];

    protected $table = 'transformador';

    public function conclusao()
    {
        return $this->belongsToMany(comunicadoConclusaoObra::class, 'conclusao_transformador', 'transformador_id', 'conclusao_id')->withPivot(['situacao']);
    }
}
