<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class StockHistory extends Model
{
    use HasFactory;

    protected $fillable = [
        'product_id',
        'nama_produk',
        'status',
        'jumlah',
        'stok_sebelum',
        'stok_sesudah',
        'keterangan'
    ];

    /**
     * Relasi ke produk (opsional, jika produk masih ada)
     */
    public function product()
    {
        return $this->belongsTo(Product::class);
    }
}
