<?php

namespace Vendtics\App\Models;

use Vendtics\WpMVC\Database\Eloquent\Relations\HasMany;

defined( "ABSPATH" ) || exit;

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

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

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

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