This commit is contained in:
90
api/app/Models/Ambulatorio/AtendimentoSoapFerida.php
Normal file
90
api/app/Models/Ambulatorio/AtendimentoSoapFerida.php
Normal file
@@ -0,0 +1,90 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Ambulatorio;
|
||||
|
||||
use App\Models\Ambulatorio\AtendimentoSoap;
|
||||
use App\Models\Cadastro\Ferida;
|
||||
use App\Models\Cadastro\FeridaExsudato;
|
||||
use App\Models\Cadastro\FeridaNecrose;
|
||||
use App\Models\Cadastro\Lado;
|
||||
use App\Models\Cadastro\LocalAnatomico;
|
||||
use App\Models\Cadastro\LocalAnatomicoRegiao;
|
||||
use App\Models\Model;
|
||||
|
||||
|
||||
class AtendimentoSoapFerida extends Model
|
||||
{
|
||||
protected $table = 'ambulatorio_atendimento_soap_ferida';
|
||||
|
||||
protected $casts = [
|
||||
'data' => 'date',
|
||||
'cicatrizada' => 'boolean',
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'soap_id',
|
||||
'id_old',
|
||||
'ferida_id',
|
||||
'local_anatomico_id',
|
||||
'local_anatomico_regiao_id',
|
||||
'lado_id',
|
||||
'ferida_exsudato_id',
|
||||
'ferida_necrose',
|
||||
'data',
|
||||
'cicatrizada',
|
||||
'comprimento',
|
||||
'largura',
|
||||
'profundidade',
|
||||
'dor',
|
||||
'observacao',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
|
||||
public function soap()
|
||||
{
|
||||
return $this->belongsTo(AtendimentoSoap::class);
|
||||
}
|
||||
|
||||
public function ferida()
|
||||
{
|
||||
return $this->belongsTo(Ferida::class);
|
||||
}
|
||||
|
||||
public function localAnatomico()
|
||||
{
|
||||
return $this->belongsTo(LocalAnatomico::class);
|
||||
}
|
||||
|
||||
public function localAnatomicoRegiao()
|
||||
{
|
||||
return $this->belongsTo(LocalAnatomicoRegiao::class);
|
||||
}
|
||||
|
||||
public function exsudato()
|
||||
{
|
||||
return $this->belongsTo(FeridaExsudato::class);
|
||||
}
|
||||
|
||||
public function necrose()
|
||||
{
|
||||
return $this->belongsTo(FeridaNecrose::class);
|
||||
}
|
||||
|
||||
public function procedimentos()
|
||||
{
|
||||
return $this->hasMany(AtendimentoSoapFeridaProcedimento::class, 'soap_ferida_id', 'id');
|
||||
}
|
||||
|
||||
public function images()
|
||||
{
|
||||
return $this->hasMany(AtendimentoSoapFeridaImagem::class, 'soap_ferida_id', 'id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user