<?php

namespace App\Models;

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

class DiscountItem extends Model
{
    use HasFactory;

    protected $fillable = ['item_reference_id', 'price', 'discount_id', 'percent', 'original_price'];

    public function itemReference()
    {
        return $this->belongsTo(ItemReference::class);
    }

    public function discount()
    {
        return $this->belongsTo(Discount::class);
    }
}
