This commit is contained in:
43
api/app/Models/Regulacao/ParametrizacaoSolicitante.php
Normal file
43
api/app/Models/Regulacao/ParametrizacaoSolicitante.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Regulacao;
|
||||
|
||||
use App\Models\Cadastro\Estabelecimento\Infraestrutura;
|
||||
use App\Models\Model;
|
||||
|
||||
class ParametrizacaoSolicitante extends Model
|
||||
{
|
||||
protected $table = 'regulacao_parametrizacao_solicitante';
|
||||
|
||||
protected $casts = [
|
||||
'atende_outro_municipio' => 'boolean',
|
||||
'is_ppi' => 'boolean',
|
||||
'atende_outro_municipio' => 'boolean',
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'atende_outro_municipio',
|
||||
'infraestrutura_id',
|
||||
'is_ppi',
|
||||
'atende_outro_municipio',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
|
||||
public function infraestrutura()
|
||||
{
|
||||
return $this->belongsTo(Infraestrutura::class);
|
||||
}
|
||||
|
||||
public function solicitanteReguladores()
|
||||
{
|
||||
return $this->hasMany(ParametrizacaoSolicitanteRegulador::class, 'solicitante_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user