This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Cadastro\SujeitoAtencao;
|
||||
|
||||
use App\Models\Cadastro\SujeitoAtencao\PacienteInformacaoResidencialFinanciamento;
|
||||
use App\Models\Cadastro\SujeitoAtencao\PacienteInformacaoResidencialVeiculo;
|
||||
use App\Models\Model;
|
||||
use App\Models\Sigtap\Ocupacao;
|
||||
|
||||
class PacienteInformacaoResidencial extends Model
|
||||
{
|
||||
|
||||
protected $table = 'cadastro_paciente_informacao_residencial';
|
||||
|
||||
protected $casts = [
|
||||
'possui_veiculo_proprio' => 'boolean',
|
||||
'possui_financiamento' => 'boolean',
|
||||
'possui_emprestimo' => 'boolean',
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'paciente_id',
|
||||
'renda_mensal',
|
||||
'ocupacao_id',
|
||||
'renda_total_familiar',
|
||||
'possui_veiculo_proprio',
|
||||
'possui_financiamento',
|
||||
'possui_emprestimo',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
'deleted_at',
|
||||
'deleted_lotacao_id',
|
||||
'deleted_centro_custo_id',
|
||||
];
|
||||
|
||||
public function paciente()
|
||||
{
|
||||
return $this->belongsTo(Paciente::class);
|
||||
}
|
||||
|
||||
public function veiculo()
|
||||
{
|
||||
return $this->hasMany(PacienteInformacaoResidencialVeiculo::class);
|
||||
}
|
||||
|
||||
public function financiamento()
|
||||
{
|
||||
return $this->hasMany(PacienteInformacaoResidencialFinanciamento::class);
|
||||
}
|
||||
|
||||
public function emprestimo()
|
||||
{
|
||||
return $this->hasMany(PacienteInformacaoResidencialEmprestimo::class);
|
||||
}
|
||||
|
||||
public function ocupacao()
|
||||
{
|
||||
return $this->belongsTo(Ocupacao::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user