Files
rkm-conectasus-ci-sandbox/api/app/Models/Cadastro/UnidadeExecutanteManutencao.php
Antonio Lopes dos Santos afec302c3e
All checks were successful
build-api-image / build (push) Successful in 51s
init commit
2026-08-04 16:52:02 -03:00

51 lines
1.1 KiB
PHP

<?php
namespace App\Models\Cadastro;
use App\Models\Cadastro\Estabelecimento\Infraestrutura;
use App\Models\Cadastro\Fornecedor\Fornecedor;
use App\Models\Cadastro\SujeitoAtencao\Usuario;
use App\Models\Model;
class UnidadeExecutanteManutencao extends Model
{
protected $table = 'cadastro_unidade_executante_manutencao';
protected $fillable = [
'fornecedor_id',
'infraestrutura_id',
'is_prestador',
'status',
'usuario_id',
];
protected $casts = [
'is_prestador' => 'boolean',
'status' => 'boolean',
];
protected $hidden = [
'created_at',
'created_lotacao_id',
'created_centro_custo_id',
'updated_at',
'updated_lotacao_id',
'updated_centro_custo_id',
];
public function getUsuario()
{
return $this->belongsTo(Usuario::class, 'usuario_id');
}
public function getInfraestrutura()
{
return $this->belongsTo(Infraestrutura::class, 'infraestrutura_id');
}
public function getFornecedor()
{
return $this->belongsTo(Fornecedor::class, 'fornecedor_id');
}
}