<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;

class SubscriptionPlan extends Model
{
    protected $fillable = [
        'name','name_ar','price_monthly','price_yearly',
        'max_daily_patients','show_ads','priority_listing',
        'video_allowed','max_videos','features','is_active','sort_order',
    ];
    protected $casts = [
        'features'         => 'array',
        'show_ads'         => 'boolean',
        'priority_listing' => 'boolean',
        'video_allowed'    => 'boolean',
        'is_active'        => 'boolean',
        'price_monthly'    => 'decimal:2',
        'price_yearly'     => 'decimal:2',
    ];
    public function subscriptions() { return $this->hasMany(Subscription::class, 'plan_id'); }
}
