This commit is contained in:
50
api/app/Models/Almoxarifado/Inventario.php
Normal file
50
api/app/Models/Almoxarifado/Inventario.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Almoxarifado;
|
||||
|
||||
use App\Models\Cadastro\Material\Material;
|
||||
use App\Models\Integracao\Bnafar\Medicamento;
|
||||
use App\Models\Model;
|
||||
|
||||
class Inventario extends Model
|
||||
{
|
||||
protected $table = 'almoxarifado_inventario';
|
||||
|
||||
protected $casts = [
|
||||
'finalizado' => 'boolean',
|
||||
'finalizado_em' => 'datetime:d/m/Y',
|
||||
'validade_lote' => 'datetime:d/m/Y',
|
||||
'is_novo_lote' => 'boolean',
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'finalizado',
|
||||
'finalizado_em',
|
||||
'inventario_id',
|
||||
'material_id',
|
||||
'integracao_bnafar_medicamento_id',
|
||||
'lote',
|
||||
'validade_lote',
|
||||
'contagem',
|
||||
'is_novo_lote',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'created_at',
|
||||
'created_lotacao_id',
|
||||
'created_centro_custo_id',
|
||||
'updated_at',
|
||||
'updated_lotacao_id',
|
||||
'updated_centro_custo_id',
|
||||
];
|
||||
|
||||
public function material()
|
||||
{
|
||||
return $this->belongsTo(Material::class);
|
||||
}
|
||||
|
||||
public function integracaoBnafarMedicamento()
|
||||
{
|
||||
return $this->belongsTo(Medicamento::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user