<?php

namespace App\Models\Ecommerce\Product\Product\Concerns;

use Illuminate\Database\Eloquent\Relations\MorphMany;

trait ProductStock
{
    /**
     * Inventory history
     */
    public function inventoryHistories(): MorphMany
    {
        return $this->morphMany(InventoryHistory::class, 'stockable')->orderBy('created_at', 'desc');
    }
}
