<?php

namespace App\Models\Qualitys;

use App\Models\Items\Item;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
 * @mixin IdeHelperLot
 */
class Lot extends Model
{
    use SoftDeletes;

    // 품목 (통합 items 테이블)
    public function item()
    {
        return $this->belongsTo(Item::class, 'item_id');
    }

    // 판매 기록
    public function sales()
    {
        return $this->hasMany(LotSale::class, 'lot_id');
    }
}
