<?php

namespace App\Models;

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

class ContentModerationFeedback extends Model
{
    protected $table = 'content_moderation_feedback';

    public $timestamps = false;

    protected $fillable = [
        'finding_id',
        'feedback_type',
        'actor_id',
        'notes',
        'meta_json',
        'created_at',
    ];

    protected $casts = [
        'finding_id' => 'integer',
        'actor_id' => 'integer',
        'meta_json' => 'array',
        'created_at' => 'datetime',
    ];

    public function finding(): BelongsTo
    {
        return $this->belongsTo(ContentModerationFinding::class, 'finding_id');
    }

    public function actor(): BelongsTo
    {
        return $this->belongsTo(User::class, 'actor_id');
    }
}