<?php

namespace App\Models;

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

class VoucherEvent extends Model
{
    use HasFactory, SoftDeletes;

    protected $fillable = ['name', 'referral','nominal','calculation_type','code', 'redeem_point','for_affiliator','start_at','end_at','claim_limit','min_sales'];

    public function items(){
        return $this->belongsToMany(ItemReference::class,"voucher_items");
    }
}
