<?php

namespace App\Models\Concerns;

use Illuminate\Database\Eloquent\Builder;

trait BelongsToOwner
{
    public function scopeOwned(Builder $query, string $ownerRef): Builder
    {
        return $query->where($this->getTable().'.owner_ref', $ownerRef);
    }
}
