init commit
All checks were successful
build-api-image / build (push) Successful in 51s

This commit is contained in:
Antonio Lopes dos Santos
2026-08-04 16:52:02 -03:00
commit afec302c3e
11594 changed files with 1636728 additions and 0 deletions

View File

@@ -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);
}
}