51 lines
1.1 KiB
PHP
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');
|
|
}
|
|
}
|