<?php

namespace App\Domains\Link\Models;

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

class LinkVariant extends Model
{
    protected $guarded = ['id'];

    protected $casts = [
        'weight' => 'integer',
        'clicks_count' => 'integer',
        'conversions_count' => 'integer',
    ];

    /** @return BelongsTo<Link, $this> */
    public function link(): BelongsTo
    {
        return $this->belongsTo(Link::class);
    }
}
