This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ProntoAtendimento\Atendimento\Medico;
|
||||
|
||||
use App\Models\Geral\DocumentoTipo;
|
||||
use App\Models\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class Atestado extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $table = 'pronto_atendimento_atendimento_medico_atestado';
|
||||
|
||||
protected $casts = [
|
||||
'imprime_cid' => 'boolean',
|
||||
'paciente' => 'boolean',
|
||||
'horario_inicial' => 'datetime:H:i',
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'modelo_id',
|
||||
'imprime_cid',
|
||||
'dias',
|
||||
'quantidade_horas',
|
||||
'horario_inicial',
|
||||
'documento_tipo_id',
|
||||
'documento_numero',
|
||||
'paciente',
|
||||
'nome_acompanhante',
|
||||
];
|
||||
|
||||
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 atendimentoMedico()
|
||||
{
|
||||
return $this->belongsTo(AtendimentoMedico::class);
|
||||
}
|
||||
|
||||
public function documentoTipo()
|
||||
{
|
||||
return $this->belongsTo(DocumentoTipo::class);
|
||||
}
|
||||
|
||||
public function modelo()
|
||||
{
|
||||
return $this->belongsTo(AtestadoModelo::class, 'modelo_id');
|
||||
}
|
||||
|
||||
public function getIsAllowedToDeleteAttribute()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user