<?php

namespace App\Models\Concerns;

use App\Models\Scopes\AccessibleBranchScope;

/**
 * Tags a model with the AccessibleBranchScope global scope. Applied to the
 * Branch model itself (which cannot use BranchScoped — that trait scopes by
 * an owning branch_id column this model does not have).
 */
trait HasAccessibleBranchScope
{
    public static function bootHasAccessibleBranchScope(): void
    {
        static::addGlobalScope(new AccessibleBranchScope);
    }
}