<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;

class ApiClient extends Model
{
    protected $fillable = [
        'name',
        'email',
        'api_key',
        'is_active',
        'wallet_balance',
        'pan_charge',
        'aadhaar_otp_charge',
        'aadhaar_submit_charge',
        'aadhaar_basic_charge',
        'aadhaar_pan_link_charge',
        'gst_charge',
        'bank_charge',
        'obf_charge',
        'user_creation_charge',
    ];

    protected $casts = [
        'is_active' => 'boolean',
        'wallet_balance' => 'float',
        'pan_charge' => 'float',
        'aadhaar_otp_charge' => 'float',
        'aadhaar_submit_charge' => 'float',
        'aadhaar_basic_charge' => 'float',
        'aadhaar_pan_link_charge' => 'float',
        'gst_charge' => 'float',
        'bank_charge' => 'float',
        'obf_charge' => 'float',
        'user_creation_charge' => 'float',
    ];

    public function verificationLogs(): HasMany
    {
        return $this->hasMany(VerificationLog::class);
    }

    public function recharges(): HasMany
    {
        return $this->hasMany(WalletRecharge::class);
    }
}
