<?php

namespace Vendtics\App\Models;

defined( "ABSPATH" ) || exit;

use Vendtics\WpMVC\App;
use Vendtics\WpMVC\Database\Resolver;
use Vendtics\WpMVC\Database\Eloquent\Model;
use Vendtics\WpMVC\Database\Eloquent\Relations\BelongsToOne;

class Note extends Model {
    public static function get_table_name():string {
        return 'vendtics_notes';
    }

    public function resolver():Resolver {
        return App::$container->get( Resolver::class );
    }

    public function user(): BelongsToOne {
        return $this->belongs_to_one( User::class, 'ID', 'created_by' );
    }
}