<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;

class DealStage extends Model
{
    use HasFactory;

    protected static function booted(): void
    {
        static::addGlobalScope('current_deal_statuses', function ($query) {
            $query->where('deal_stages.id', '<=', 10);
        });
    }
}
