<?php

namespace CliqThemes\ORM\Entities;

use CliqThemes\ORM\Model;

/**
 * ORM model representing the wp_usermeta table.
 */
class UserMeta extends Model
{
    protected string $table = 'usermeta';

    protected string $primaryKey = 'umeta_id';

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

    protected bool $timestamps = false;

    /**
     * Relationship back to the owning user.
     */
    public function user()
    {
        return $this->belongsTo(User::class, 'user_id', 'ID');
    }
}

