<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class OfferwallClick extends Model
{
    use SoftDeletes;

    protected $guarded = [];

    protected $casts = ['completed_at' => 'datetime'];

    public function campaign(): BelongsTo
    {
        return $this->belongsTo(Campaign::class);
    }

    public function lead(): BelongsTo
    {
        return $this->belongsTo(Lead::class);
    }

    public function offerwall(): BelongsTo
    {
        return $this->belongsTo(Offerwall::class);
    }

    public function providerOffer(): BelongsTo
    {
        return $this->belongsTo(ProviderOffer::class);
    }

    public function user(): BelongsTo
    {
        return $this->belongsTo(User::class);
    }
}
