pdv.backend/app/Models/Inventory.php

40 lines
679 B
PHP

<?php namespace App\Models;
/**
* @copyright (c) 2025 Notsoweb Software (https://notsoweb.com) - All Rights Reserved
*/
use Illuminate\Database\Eloquent\Model;
/**
* Descripción
*
* @author Moisés Cortés C. <moises.cortes@notsoweb.com>
*
* @version 1.0.0
*/
class Inventory extends Model
{
protected $fillable = [
'category_id',
'name',
'sku',
'stock',
'is_active',
];
protected $casts = [
'is_active' => 'boolean',
];
public function category()
{
return $this->belongsTo(Category::class);
}
public function price()
{
return $this->hasOne(Price::class);
}
}