<?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\HasMany;

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

    public function contacts():HasMany {
        return $this->has_many( EntityTag::class, 'tag_id', 'id' );
    }

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