<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class PremiumFeature extends Model
{
    protected $fillable = ['title', 'description', 'icon', 'image', 'order', 'is_active'];

    protected $casts = [
        'order' => 'integer',
        'is_active' => 'boolean',
    ];

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

    public function scopeOrdered($query)
    {
        return $query->orderBy('order');
    }
}
