Files
pos_heidiver/app/Models/Inventario.php
T
2026-01-06 15:35:59 -05:00

40 lines
753 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class Inventario extends Model
{
use HasFactory;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'producto_id',
'stock_actual',
'stock_minimo',
'ubicacion',
];
/**
* The attributes that should be cast to native types.
*
* @var array
*/
protected $casts = [
'id' => 'integer',
'producto_id' => 'integer',
];
public function producto(): BelongsTo
{
return $this->belongsTo(Producto::class);
}
}