<?php

namespace App\Models;

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

class OfferInteraction extends Model
{
    use HasFactory;

    protected $fillable = [
        'offer_id',
        'user_id',
        'interaction_type',
        'device_info',
        'ip_address',
    ];

    /**
     * العرض المرتبط بالتفاعل
     */
    public function offer()
    {
        return $this->belongsTo(Offer::class);
    }

    /**
     * المستخدم المرتبط بالتفاعل
     */
    public function user()
    {
        return $this->belongsTo(User::class);
    }
}
