'integer', 'min_stock' => 'integer', 'max_stock' => 'integer', ]; // Relaciones public function inventory() { return $this->belongsTo(Inventory::class); } public function warehouse() { return $this->belongsTo(Warehouse::class); } // MĂ©todos Ăștiles public function isLowStock(): bool { return $this->min_stock && $this->stock <= $this->min_stock; } public function isOverStock(): bool { return $this->max_stock && $this->stock >= $this->max_stock; } public function hasAvailableStock(int $quantity): bool { return $this->stock >= $quantity; } }