<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

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

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

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

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