This commit is contained in:
35
api/app/Models/Integracao/Bnafar/Medicamento.php
Normal file
35
api/app/Models/Integracao/Bnafar/Medicamento.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Integracao\Bnafar;
|
||||
|
||||
use App\Models\Cadastro\Material\Material;
|
||||
use App\Models\Cadastro\Material\MaterialIntegracaoBnafarMedicamento;
|
||||
use App\Models\Model;
|
||||
|
||||
class Medicamento extends Model
|
||||
{
|
||||
protected $table = 'integracao_bnafar_medicamento';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'codigo',
|
||||
'descricao',
|
||||
'codigo_catmat',
|
||||
'cnpj_nome_fabricante',
|
||||
'codigo_registro_sanitario',
|
||||
'codigo_barras_primario',
|
||||
'codigo_barras_secundario',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
|
||||
public function materiais()
|
||||
{
|
||||
return $this->belongsToMany(Material::class, 'cadastro_material_integracao_bnafar_medicamento', 'medicamento_id', 'material_id')
|
||||
->using(MaterialIntegracaoBnafarMedicamento::class)
|
||||
->withTimestamps();
|
||||
}
|
||||
}
|
||||
20
api/app/Models/Integracao/Bnafar/OperacaoTipo.php
Normal file
20
api/app/Models/Integracao/Bnafar/OperacaoTipo.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Integracao\Bnafar;
|
||||
|
||||
use App\Models\Model;
|
||||
|
||||
class OperacaoTipo extends Model
|
||||
{
|
||||
protected $table = 'integracao_bnafar_operacao_tipo';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'descricao',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
}
|
||||
29
api/app/Models/Integracao/Bnafar/Parametrizacao.php
Normal file
29
api/app/Models/Integracao/Bnafar/Parametrizacao.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Integracao\Bnafar;
|
||||
|
||||
use App\Models\Model;
|
||||
|
||||
class Parametrizacao extends Model
|
||||
{
|
||||
protected $table = 'integracao_bnafar_parametrizacao';
|
||||
|
||||
protected $casts = [
|
||||
'ativo' => 'boolean',
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'usuario',
|
||||
'senha',
|
||||
'ativo',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
}
|
||||
28
api/app/Models/Integracao/Bnafar/PosicaoEstoque.php
Normal file
28
api/app/Models/Integracao/Bnafar/PosicaoEstoque.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Integracao\Bnafar;
|
||||
|
||||
use App\Models\Model;
|
||||
|
||||
class PosicaoEstoque extends Model
|
||||
{
|
||||
protected $table = 'integracao_bnafar_posicao_estoque';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'protocolo_id',
|
||||
'centro_custo_id',
|
||||
'data_posicao_estoque',
|
||||
'codigo_registro',
|
||||
'processado_sucesso',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
}
|
||||
32
api/app/Models/Integracao/Bnafar/PosicaoEstoqueItem.php
Normal file
32
api/app/Models/Integracao/Bnafar/PosicaoEstoqueItem.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Integracao\Bnafar;
|
||||
|
||||
use App\Models\Model;
|
||||
|
||||
class PosicaoEstoqueItem extends Model
|
||||
{
|
||||
protected $table = 'integracao_bnafar_posicao_estoque_item';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'posicao_estoque_id',
|
||||
'material_id',
|
||||
'fabricante_id',
|
||||
'integracao_bnafar_medicamento_id',
|
||||
'lote',
|
||||
'data_validade',
|
||||
'quantidade',
|
||||
'valor_unitario',
|
||||
'mensagem',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
}
|
||||
20
api/app/Models/Integracao/Bnafar/ProcessamentoStatus.php
Normal file
20
api/app/Models/Integracao/Bnafar/ProcessamentoStatus.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Integracao\Bnafar;
|
||||
|
||||
use App\Models\Model;
|
||||
|
||||
class ProcessamentoStatus extends Model
|
||||
{
|
||||
protected $table = 'integracao_bnafar_processamento_status';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'descricao',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
}
|
||||
29
api/app/Models/Integracao/Bnafar/Protocolo.php
Normal file
29
api/app/Models/Integracao/Bnafar/Protocolo.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Integracao\Bnafar;
|
||||
|
||||
use App\Models\Model;
|
||||
|
||||
class Protocolo extends Model
|
||||
{
|
||||
protected $table = 'integracao_bnafar_protocolo';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'processamento_status_id',
|
||||
'servico_tipo_id',
|
||||
'operacao_tipo_id',
|
||||
'protocolo',
|
||||
'data_protocolo',
|
||||
'erro',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
}
|
||||
21
api/app/Models/Integracao/Bnafar/ProtocoloResposta.php
Normal file
21
api/app/Models/Integracao/Bnafar/ProtocoloResposta.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Integracao\Bnafar;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class ProtocoloResposta extends Model
|
||||
{
|
||||
protected $table = 'integracao_bnafar_protocolo_resposta';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'protocolo_id',
|
||||
'resposta',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
}
|
||||
21
api/app/Models/Integracao/Bnafar/Resposta.php
Normal file
21
api/app/Models/Integracao/Bnafar/Resposta.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Integracao\Bnafar;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Resposta extends Model
|
||||
{
|
||||
protected $table = 'integracao_bnafar_resposta';
|
||||
|
||||
protected $fillable = [
|
||||
'codigo',
|
||||
'mensagem',
|
||||
'descricao',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
}
|
||||
31
api/app/Models/Integracao/Bnafar/Saida.php
Normal file
31
api/app/Models/Integracao/Bnafar/Saida.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Integracao\Bnafar;
|
||||
|
||||
use App\Models\Model;
|
||||
|
||||
class Saida extends Model
|
||||
{
|
||||
protected $table = 'integracao_bnafar_saida';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'protocolo_id',
|
||||
'saida_tipo_id',
|
||||
'almoxarifado_saida_id',
|
||||
'centro_custo_id',
|
||||
'centro_custo_destino_id',
|
||||
'data_saida',
|
||||
'codigo_registro',
|
||||
'processado_sucesso',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
}
|
||||
33
api/app/Models/Integracao/Bnafar/SaidaItem.php
Normal file
33
api/app/Models/Integracao/Bnafar/SaidaItem.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Integracao\Bnafar;
|
||||
|
||||
use App\Models\Model;
|
||||
|
||||
class SaidaItem extends Model
|
||||
{
|
||||
protected $table = 'integracao_bnafar_saida_item';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'saida_id',
|
||||
'almoxarifado_saida_item_id',
|
||||
'material_id',
|
||||
'fabricante_id',
|
||||
'integracao_bnafar_medicamento_id',
|
||||
'lote',
|
||||
'data_validade',
|
||||
'quantidade',
|
||||
'valor_unitario',
|
||||
'mensagem',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
}
|
||||
21
api/app/Models/Integracao/Bnafar/SaidaTipo.php
Normal file
21
api/app/Models/Integracao/Bnafar/SaidaTipo.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Integracao\Bnafar;
|
||||
|
||||
use App\Models\Model;
|
||||
|
||||
class SaidaTipo extends Model
|
||||
{
|
||||
protected $table = 'integracao_bnafar_saida_tipo';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'codigo',
|
||||
'descricao',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
}
|
||||
20
api/app/Models/Integracao/Bnafar/ServicoTipo.php
Normal file
20
api/app/Models/Integracao/Bnafar/ServicoTipo.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Integracao\Bnafar;
|
||||
|
||||
use App\Models\Model;
|
||||
|
||||
class ServicoTipo extends Model
|
||||
{
|
||||
protected $table = 'integracao_bnafar_servico_tipo';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'descricao',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user