<?php

namespace App\Models\Concerns;

use App\Models\Scopes\DualBranchScope;

/**
 * For models with two branch columns (from/to) where a single branch_id
 * scope can't express "visible if the user can access either endpoint" —
 * e.g. StockTransfer. Unlike {@see BranchScoped}, applies no create-time
 * auto-stamp: both columns are always explicitly supplied by the caller.
 */
trait DualBranchScoped
{
    public static function bootDualBranchScoped(): void
    {
        static::addGlobalScope(new DualBranchScope);
    }
}
