<?php

declare(strict_types=1);

namespace App\Models;

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

class NovaCardReaction extends Model
{
    public const TYPE_LIKE = 'like';
    public const TYPE_FAVORITE = 'favorite';

    protected $fillable = [
        'card_id',
        'user_id',
        'type',
    ];

    public function card(): BelongsTo
    {
        return $this->belongsTo(NovaCard::class, 'card_id');
    }

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