51 lines
1.1 KiB
PHP
51 lines
1.1 KiB
PHP
<?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);
|
|
}
|
|
}
|