<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class AiProvider extends Model
{
    protected $fillable = [
        'provider_name', 'provider_key', 'api_endpoint', 
        'api_key', 'default_model', 'priority', 
        'is_enabled', 'is_default', 'notes'
    ];

    protected $casts = [
        'api_key' => 'encrypted', // Automatically encrypt/decrypt securely
        'is_enabled' => 'boolean',
        'is_default' => 'boolean',
        'priority' => 'integer',
    ];
}