<?php

namespace Modules\VetClinic\Entities;

use Illuminate\Database\Eloquent\Model;

class VcImagingModality extends Model
{
    protected $table = 'vc_imaging_modalities';
    protected $guarded = ['id'];

    public function scopeForBusiness($q, int $businessId)
    {
        return $q->where(function ($qq) use ($businessId) {
            $qq->where('business_id', $businessId)->orWhereNull('business_id');
        });
    }
}
