This commit is contained in:
79
api/app/Models/TransportePaciente/Viagem.php
Normal file
79
api/app/Models/TransportePaciente/Viagem.php
Normal file
@@ -0,0 +1,79 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\TransportePaciente;
|
||||
|
||||
use App\Models\Model;
|
||||
use App\Models\TransportePaciente\Condutor\Condutor;
|
||||
use App\Models\TransportePaciente\Veiculo\Veiculo;
|
||||
use App\Models\TransportePaciente\Jornada\Jornada;
|
||||
use App\Models\TransportePaciente\Destino\Destino;
|
||||
use App\Models\TransportePaciente\Agendar\Agendar;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
|
||||
class Viagem extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'transporte_paciente_viagem';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'condutor_id',
|
||||
'veiculo_id',
|
||||
'data',
|
||||
'horario_saida_temp',
|
||||
'horario_saida_real',
|
||||
'horario_chegada_destino',
|
||||
'horario_saida_destino',
|
||||
'data_chegada',
|
||||
'horario_chegada',
|
||||
'km_saida',
|
||||
'km_chegada',
|
||||
'diaria',
|
||||
'refeicao',
|
||||
'pernoite',
|
||||
'pedagio',
|
||||
'combustivel',
|
||||
'outras_despesas',
|
||||
'descricao_outras_despesas',
|
||||
'total_despesa',
|
||||
'status_id',
|
||||
'jornada_id',
|
||||
'destino_id',
|
||||
'protocolo'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
|
||||
public function condutor()
|
||||
{
|
||||
return $this->belongsTo(Condutor::class);
|
||||
}
|
||||
|
||||
public function veiculo()
|
||||
{
|
||||
return $this->belongsTo(Veiculo::class);
|
||||
}
|
||||
|
||||
public function jornada()
|
||||
{
|
||||
return $this->belongsTo(Jornada::class);
|
||||
}
|
||||
|
||||
public function destino()
|
||||
{
|
||||
return $this->belongsTo(Destino::class);
|
||||
}
|
||||
|
||||
public function agendar()
|
||||
{
|
||||
return $this->belongsTo(Agendar::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user