<?php

namespace App\Models;

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

class AffiliatorItem extends Model
{
    use HasFactory, SoftDeletes;

    protected $table = 'affiliator_items';
    protected $primaryKey = 'id';
    public $incrementing = true;
    protected $keyType = 'int';

    protected $fillable = [
        'item_reference_id',
        'discount',
        'fee',
        'qty',
    ];

    public function item()
    {
        return $this->belongsTo(ItemReference::class, 'item_reference_id', 'id');
    }

}
