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

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

    public function contact():HasOne {
        return $this->has_one( Contact::class, 'id', 'contact_id' );
    }

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