This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameImagem\Parametrizacao;
|
||||
|
||||
use App\Models\Cadastro\Estabelecimento\Infraestrutura;
|
||||
use App\Models\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class AppConectasusCidadaoPrestador extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $table = 'exame_imagem_parametrizacao_app_conectasus_cidadao_prestador';
|
||||
|
||||
protected $fillable = [
|
||||
'infraestrutura_id',
|
||||
'percentual_financeiro',
|
||||
'percentual_quantitativo',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'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 infraestrutura()
|
||||
{
|
||||
return $this->belongsTo(Infraestrutura::class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameImagem\Parametrizacao;
|
||||
|
||||
use App\Enums\ExameImagem\Parametrizacao\ControleJornada\Tipo;
|
||||
use App\Models\ExameImagem\Parametrizacao;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class ControleJornada extends Model
|
||||
{
|
||||
protected $table = 'exame_imagem_parametrizacao_controle_jornada';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'tipo_controle',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
|
||||
|
||||
public function parametrizacaoExameImagem()
|
||||
{
|
||||
return $this->hasOne(Parametrizacao::class);
|
||||
}
|
||||
public function tipo()
|
||||
{
|
||||
return $this->belongsTo(Tipo::class);
|
||||
}
|
||||
|
||||
public function getIsAllowedToDeleteAttribute()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameImagem\Parametrizacao\ControleJornada;
|
||||
|
||||
use App\Enums\ExameImagem\Parametrizacao\ControleJornada\Tipo;
|
||||
use App\Models\ExameImagem\Jornada\Jornada;
|
||||
use App\Models\Model;
|
||||
|
||||
class TipoControleJornada extends Model
|
||||
{
|
||||
|
||||
protected $table = 'exame_imagem_parametrizacao_controle_jornada_tipo';
|
||||
|
||||
protected $fillable = [
|
||||
'descricao'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
|
||||
public function getIdentificadorAttribute()
|
||||
{
|
||||
if ($this->id === Tipo::ATENDIMENTO) {
|
||||
|
||||
return Tipo::ATENDIMENTO;
|
||||
}
|
||||
if ($this->id === Tipo::EXAME) {
|
||||
|
||||
return Tipo::EXAME;
|
||||
}
|
||||
}
|
||||
|
||||
public function jornadaExameImagem()
|
||||
{
|
||||
return $this->hasMany(Jornada::class);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameImagem\Parametrizacao;
|
||||
|
||||
use App\Models\Model;
|
||||
|
||||
class ExameAmbulatorioAtendimento extends Model
|
||||
{
|
||||
|
||||
protected $table = 'exame_imagem_parametrizacao_exame_ambulatorio_atendimento';
|
||||
|
||||
protected $casts = [
|
||||
'exibir' => 'boolean',
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'exibir',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameImagem\Parametrizacao;
|
||||
|
||||
use App\Models\Model;
|
||||
|
||||
class IntegracaoAplicativo extends Model
|
||||
{
|
||||
protected $table = 'exame_imagem_parametrizacao_integracao_aplicativo';
|
||||
|
||||
protected $casts = [
|
||||
'habilita_agendamento_conectasus_cidadao' => 'boolean',
|
||||
'habilita_consulta_imagem_conectasus_cidadao' => 'boolean',
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'habilita_agendamento_conectasus_cidadao',
|
||||
'habilita_consulta_imagem_conectasus_cidadao',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameImagem\Parametrizacao;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
class MensagemProtocolo extends Model
|
||||
{
|
||||
protected $table = 'exame_imagem_parametrizacao_mensagem_protocolo';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'mensagem',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameImagem\Parametrizacao;
|
||||
|
||||
use App\Enums\ExameImagem\Mes;
|
||||
use App\Models\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class MesCotaPrestador extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $table = 'exame_imagem_parametrizacao_cota_prestador_mes';
|
||||
|
||||
protected $fillable = [
|
||||
'descricao'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
}
|
||||
34
api/app/Models/ExameImagem/Parametrizacao/Ocupacao.php
Normal file
34
api/app/Models/ExameImagem/Parametrizacao/Ocupacao.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameImagem\Parametrizacao;
|
||||
|
||||
use App\Models\Sigtap\Ocupacao as SigtapOcupacao;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class Ocupacao extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $table = 'exame_imagem_parametrizacao_ocupacao';
|
||||
|
||||
protected $fillable = [
|
||||
'ocupacao_id',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'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 ocupacao()
|
||||
{
|
||||
return $this->belongsTo(SigtapOcupacao::class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameImagem\Parametrizacao;
|
||||
|
||||
use App\Models\ExameImagem\Parametrizacao;
|
||||
use App\Models\ExameImagem\Parametrizacao\ParametrizacaoUnidadeSmsExame;
|
||||
use App\Models\Model;
|
||||
use App\Models\Parametrizacao\Exame\Exame;
|
||||
|
||||
class ParametrizacaoUnidadeSms extends Model
|
||||
{
|
||||
protected $table = 'exame_imagem_parametrizacao_unidade_sms';
|
||||
|
||||
protected $casts = [
|
||||
'envio_de' => 'datetime:d/m/Y',
|
||||
'envio_ate' => 'datetime:d/m/Y',
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'parametrizacao_unidade_id',
|
||||
'dia_antecedencia',
|
||||
'envio_de',
|
||||
'envio_ate',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'id',
|
||||
'created_at',
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
|
||||
public function parametrizacaoUnidade()
|
||||
{
|
||||
return $this->belongsTo(Parametrizacao::class, 'parametrizacao_unidade_id');
|
||||
}
|
||||
|
||||
public function exames()
|
||||
{
|
||||
return $this->belongsToMany(
|
||||
Exame::class,
|
||||
'exame_imagem_parametrizacao_unidade_sms_exame',
|
||||
'parametrizacao_unidade_sms_id',
|
||||
'exame_id'
|
||||
)
|
||||
->using(ParametrizacaoUnidadeSmsExame::class)
|
||||
->as('parametrizacaoUnidadeSmsExame')
|
||||
->withTimestamps();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameImagem\Parametrizacao;
|
||||
|
||||
use App\Models\Pivot;
|
||||
|
||||
class ParametrizacaoUnidadeSmsExame extends Pivot
|
||||
{
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
}
|
||||
39
api/app/Models/ExameImagem/Parametrizacao/Supervisor.php
Normal file
39
api/app/Models/ExameImagem/Parametrizacao/Supervisor.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameImagem\Parametrizacao;
|
||||
|
||||
use App\Models\Cadastro\SujeitoAtencao\Usuario;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class Supervisor extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $table = 'exame_imagem_parametrizacao_supervisor';
|
||||
|
||||
protected $fillable = [
|
||||
'usuario_id',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'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 usuario()
|
||||
{
|
||||
return $this->belongsTo(Usuario::class);
|
||||
}
|
||||
|
||||
public function getIsAllowedToDeleteAttribute()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\ExameImagem\Parametrizacao;
|
||||
|
||||
use App\Enums\ExameImagem\Tipo;
|
||||
use App\Models\ExameImagem\CotaPrestador;
|
||||
use App\Models\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class TipoCotaPrestador extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $table = 'exame_imagem_parametrizacao_cota_prestador_tipo';
|
||||
|
||||
protected $fillable = [
|
||||
'descricao'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
|
||||
public function getIdentificadorAttribute()
|
||||
{
|
||||
if ($this->id === Tipo::VALOR) {
|
||||
|
||||
return '1';
|
||||
}
|
||||
if ($this->id === Tipo::QUANTIDADE) {
|
||||
|
||||
return '2';
|
||||
}
|
||||
}
|
||||
|
||||
public function cotaPrestadorExameImagem()
|
||||
{
|
||||
return $this->hasMany(CotaPrestador::class);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user