This commit is contained in:
39
api/app/Models/WebService/Laboratorio/Cliente/Exame.php
Normal file
39
api/app/Models/WebService/Laboratorio/Cliente/Exame.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\WebService\Laboratorio\Cliente;
|
||||
|
||||
use App\Models\Parametrizacao\Exame\Exame as CadastroExame;
|
||||
use App\Models\Model;
|
||||
|
||||
class Exame extends Model
|
||||
{
|
||||
protected $table = 'web_service_laboratorio_cliente_exame';
|
||||
|
||||
protected $fillable = [
|
||||
'laboratorio_id',
|
||||
'conectasus_exame_id',
|
||||
'nome',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'laboratorio_id',
|
||||
'created_at',
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
'externo_created_usuario_id',
|
||||
'externo_updated_usuario_id',
|
||||
];
|
||||
|
||||
public function laboratorio()
|
||||
{
|
||||
return $this->belongsTo(Laboratorio::class);
|
||||
}
|
||||
|
||||
public function conectasusExame()
|
||||
{
|
||||
return $this->belongsTo(CadastroExame::class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\WebService\Laboratorio\Cliente;
|
||||
|
||||
use App\Models\Cadastro\Estabelecimento\Infraestrutura as CadastroInfraestrutura;
|
||||
use App\Models\Model;
|
||||
|
||||
class Laboratorio extends Model
|
||||
{
|
||||
protected $table = 'web_service_laboratorio_cliente_laboratorio';
|
||||
|
||||
protected $fillable = [
|
||||
'conectasus_infraestrutura_id',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
|
||||
public function conectasusInfraestrutura()
|
||||
{
|
||||
return $this->belongsTo(CadastroInfraestrutura::class);
|
||||
}
|
||||
|
||||
public function exames()
|
||||
{
|
||||
return $this->hasMany(Exame::class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\WebService\Laboratorio\Cliente;
|
||||
|
||||
use App\Models\ExameLaboratorial\AgendamentoExame\Agendamento AS ExameLaboratorialAgendamento;
|
||||
use App\Models\Model;
|
||||
|
||||
class PedidoMovimentacao extends Model
|
||||
{
|
||||
protected $table = 'web_service_laboratorio_cliente_pedido_movimentacao';
|
||||
|
||||
protected $casts = [
|
||||
'movimentado_em' => 'datetime:Y-m-d H:i:s',
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'conectasus_exame_laboratorial_agendamento_id',
|
||||
'status_id',
|
||||
'motivo',
|
||||
'movimentado_em',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
'externo_created_usuario_id',
|
||||
'externo_updated_usuario_id',
|
||||
];
|
||||
|
||||
public function pedido()
|
||||
{
|
||||
return $this->belongsTo(ExameLaboratorialAgendamento::class, 'conectasus_exame_laboratorial_agendamento_id');
|
||||
}
|
||||
|
||||
public function status()
|
||||
{
|
||||
return $this->belongsTo(PedidoStatus::class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\WebService\Laboratorio\Cliente;
|
||||
|
||||
use App\Models\Model;
|
||||
|
||||
class PedidoStatus extends Model
|
||||
{
|
||||
protected $table = 'web_service_laboratorio_cliente_pedido_status';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'nome',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user