<?php

namespace App\Traits;

use App\Models\Store;
use App\Scopes\StoreScope;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

trait HasStore
{

    protected static function booted()
    {
        static::addGlobalScope(new StoreScope());
    }

    public function store(): BelongsTo
    {
        return $this->belongsTo(Store::class);
    }

}
