<?php

namespace CliqThemes\ORM\Entities;

use CliqThemes\ORM\Model;

/**
 * ORM model representing the wp_termmeta table.
 */
class TermMeta extends Model
{
    protected string $table = 'termmeta';

    protected string $primaryKey = 'meta_id';

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

    protected bool $timestamps = false;

    /**
     * Relationship back to the owning term.
     */
    public function term()
    {
        return $this->belongsTo(Term::class, 'term_id', 'term_id');
    }
}

