<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class TaxRate extends Model
{
    use \App\Traits\HotelScopeTrait;

    public $isTenantShared = true;
    
    protected $fillable = [
        'hotel_id',
        'name',
        'rate',
        'is_active'
    ];

    protected $casts = [
        'rate' => 'decimal:2',
        'is_active' => 'boolean'
    ];

    public function scopeActive($query)
    {
        return $query->where('is_active', true);
    }
}