<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class InvestmentCategory extends Model
{
    protected $fillable = [
        'name',
        'description',
        'icon',
        'order',
        'is_active'
    ];

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

    public function products()
    {
        return $this->hasMany(InvestmentProduct::class, 'category_id');
    }

    public function investmentProducts()
    {
        return $this->hasMany(InvestmentProduct::class, 'category_id');
    }
}
