<?php

declare(strict_types=1);

namespace CliqThemes\StoreLocator\Models;

defined('ABSPATH') || exit;

use CliqThemes\ORM\Model;
use CliqThemes\ORM\Relations\BelongsToMany;

final class Brand extends Model
{
    protected string $table = 'cliq_sl_brands';

    protected string $primaryKey = 'id';

    protected array $fillable = [
        'id',
        'name',
        'slug',
        'logo',
        'description',
        'website',
        'meta',
        'lang',
        'trid',
        'source_id',
        'created_at',
        'updated_at',
    ];

    public function stores(): BelongsToMany
    {
        return $this->belongsToMany(Store::class, 'cliq_sl_brand_store', 'brand_id', 'store_id');
    }
}
