This commit is contained in:
129
api/app/Models/TransportePaciente/Agendar/Agendar.php
Normal file
129
api/app/Models/TransportePaciente/Agendar/Agendar.php
Normal file
@@ -0,0 +1,129 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\TransportePaciente\Agendar;
|
||||
|
||||
use App\Models\Cadastro\SujeitoAtencao\Paciente;
|
||||
use App\Models\Intranet\Municipio;
|
||||
use App\Models\Model;
|
||||
use App\Models\Sigtap\Procedimento;
|
||||
use App\Models\TransportePaciente\Acompanhante;
|
||||
use App\Models\TransportePaciente\Destino\Destino;
|
||||
use App\Models\TransportePaciente\Jornada\Jornada;
|
||||
use App\Models\TransportePaciente\Motivo\Motivo;
|
||||
use App\Models\TransportePaciente\Ponto\Ponto;
|
||||
use App\Models\TransportePaciente\PreAgendamentoTransporte;
|
||||
use App\Models\TransportePaciente\Status\Status;
|
||||
use App\Models\TransportePaciente\Veiculo\TipoPassageiro;
|
||||
use App\Models\TransportePaciente\Veiculo\Veiculo;
|
||||
|
||||
class Agendar extends Model
|
||||
{
|
||||
protected $table = 'transporte_paciente_agendar_transporte';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'paciente_id',
|
||||
'motivo_id',
|
||||
'data',
|
||||
'horario',
|
||||
'municipio_id',
|
||||
'destino_id',
|
||||
'consulta_observacao',
|
||||
'acompanhante',
|
||||
'ponto_id',
|
||||
'data_saida',
|
||||
'horario_saida',
|
||||
'tipo_passageiro_id',
|
||||
'veiculo_id',
|
||||
'jornada_id',
|
||||
'supervisor_id',
|
||||
'status_id',
|
||||
'viagem_id',
|
||||
'observacao',
|
||||
'pre_agendamento_id',
|
||||
'acompanhante_1_id',
|
||||
'acompanhante_2_id',
|
||||
'procedimento_id',
|
||||
'lotacao_id',
|
||||
'ocupacao_id',
|
||||
'quantidade',
|
||||
'usuario_id',
|
||||
'veiculo_edited_by',
|
||||
'veiculo_edited_at',
|
||||
'funcionalidade_origem'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
|
||||
public function paciente()
|
||||
{
|
||||
return $this->belongsTo(Paciente::class);
|
||||
}
|
||||
|
||||
public function motivo()
|
||||
{
|
||||
return $this->belongsTo(Motivo::class);
|
||||
}
|
||||
|
||||
public function municipio()
|
||||
{
|
||||
return $this->belongsTo(Municipio::class);
|
||||
}
|
||||
|
||||
public function destino()
|
||||
{
|
||||
return $this->belongsTo(Destino::class);
|
||||
}
|
||||
|
||||
public function ponto()
|
||||
{
|
||||
return $this->belongsTo(Ponto::class);
|
||||
}
|
||||
|
||||
public function tipoPassageio()
|
||||
{
|
||||
return $this->belongsTo(TipoPassageiro::class);
|
||||
}
|
||||
|
||||
public function veiculo()
|
||||
{
|
||||
return $this->belongsTo(Veiculo::class);
|
||||
}
|
||||
|
||||
public function jornada()
|
||||
{
|
||||
return $this->belongsTo(Jornada::class);
|
||||
}
|
||||
|
||||
public function preAgendamento()
|
||||
{
|
||||
return $this->belongsTo(PreAgendamentoTransporte::class);
|
||||
}
|
||||
|
||||
public function status()
|
||||
{
|
||||
return $this->belongsTo(Status::class);
|
||||
}
|
||||
|
||||
public function acompanhanteUm()
|
||||
{
|
||||
return $this->belongsTo(Acompanhante::class, 'acompanhante_1_id');
|
||||
}
|
||||
|
||||
public function acompanhanteDois()
|
||||
{
|
||||
return $this->belongsTo(Acompanhante::class, 'acompanhante_2_id');
|
||||
}
|
||||
|
||||
public function procedimento()
|
||||
{
|
||||
return $this->belongsTo(Procedimento::class);
|
||||
}
|
||||
}
|
||||
33
api/app/Models/TransportePaciente/Agendar/Historico.php
Normal file
33
api/app/Models/TransportePaciente/Agendar/Historico.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\TransportePaciente\Agendar;
|
||||
|
||||
use App\Models\Model;
|
||||
|
||||
class Historico extends Model
|
||||
{
|
||||
protected $table = 'transporte_paciente_agendar_transporte_historico';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'transporte_paciente_agendar_transporte_id',
|
||||
'data_saida',
|
||||
'horario_saida',
|
||||
'destino_id',
|
||||
'veiculo_id',
|
||||
'acompanhante',
|
||||
'motivo_id',
|
||||
'status_id',
|
||||
'lotacao_anterior_id',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'created_centro_custo_id',
|
||||
'updated_lotacao_id',
|
||||
'created_lotacao_id',
|
||||
'updated_at',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user