<?php

namespace CliqThemes\ORM\Entities;

use CliqThemes\ORM\Model;

/**
 * ORM model representing the wp_commentmeta table.
 */
class CommentMeta extends Model
{
    protected string $table = 'commentmeta';

    protected string $primaryKey = 'meta_id';

    protected array $fillable = [
        'comment_id',
        'meta_key',
        'meta_value',
    ];

    protected bool $timestamps = false;

    /**
     * Relationship back to the owning comment.
     */
    public function comment()
    {
        return $this->belongsTo(Comment::class, 'comment_id', 'comment_ID');
    }
}

