<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class StockLedger extends Model {
    protected $guarded = ['id'];
    protected function casts(): array { return ['txn_date' => 'date']; }
    public function item() { return $this->belongsTo(StockItem::class, 'item_id'); }
    public function warehouse() { return $this->belongsTo(Warehouse::class); }
}
