This commit is contained in:
76
api/app/Models/Ambulatorio/Agendamento.php
Normal file
76
api/app/Models/Ambulatorio/Agendamento.php
Normal file
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Ambulatorio;
|
||||
|
||||
use App\Models\Cadastro\SujeitoAtencao\Paciente;
|
||||
use App\Models\Model;
|
||||
use App\Models\Regulacao\Solicitacao as RegulacaoSolicitacao;
|
||||
use App\Models\Sms\SmsEnvio;
|
||||
|
||||
class Agendamento extends Model
|
||||
{
|
||||
protected $table = 'ambulatorio_agendamento';
|
||||
|
||||
protected $casts = [
|
||||
'horario' => 'datetime:H:i',
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'agendamento_anterior_id',
|
||||
'jornada_id',
|
||||
'tipo_id',
|
||||
'horario',
|
||||
'paciente_id',
|
||||
'status_id',
|
||||
'observacao',
|
||||
'motivo_cancelamento',
|
||||
'motivo_agendamento_excedente',
|
||||
'sms_envio_id',
|
||||
'regulacao_solicitacao_id',
|
||||
'origem_agendamento',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
|
||||
public function jornada()
|
||||
{
|
||||
return $this->belongsTo(Jornada::class);
|
||||
}
|
||||
|
||||
public function tipo()
|
||||
{
|
||||
return $this->belongsTo(AgendamentoTipo::class);
|
||||
}
|
||||
|
||||
public function paciente()
|
||||
{
|
||||
return $this->belongsTo(Paciente::class);
|
||||
}
|
||||
|
||||
public function status()
|
||||
{
|
||||
return $this->belongsTo(AgendamentoStatus::class);
|
||||
}
|
||||
|
||||
public function smsEnvio()
|
||||
{
|
||||
return $this->belongsTo(SmsEnvio::class);
|
||||
}
|
||||
|
||||
public function regulacaoSolicitacao()
|
||||
{
|
||||
return $this->belongsTo(RegulacaoSolicitacao::class);
|
||||
}
|
||||
|
||||
public function atendimento()
|
||||
{
|
||||
return $this->hasOne(Atendimento::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user