<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class LoanSetting extends Model
{
    protected $fillable = [

        'enabled',

        'interest_rate',

        'interest_enabled',

        'processing_fee_type',

        'processing_fee',

        'card_unlock_amount',

        'minimum_loan_amount',

        'maximum_loan_amount',

        'allowed_tenures',

        'overdue_fine_type',

        'overdue_fine_amount',

        'overdue_grace_days',

        'overdue_max_fine',

    ];


    protected $casts = [

        'enabled' =>
            'boolean',

        'interest_rate' =>
            'decimal:2',

        'interest_enabled' =>
            'boolean',

        'processing_fee' =>
            'decimal:2',

        'card_unlock_amount' =>
            'decimal:2',

        'minimum_loan_amount' =>
            'decimal:2',

        'maximum_loan_amount' =>
            'decimal:2',

        'allowed_tenures' =>
            'array',

        'overdue_fine_amount' =>
            'decimal:2',

        'overdue_grace_days' =>
            'integer',

        'overdue_max_fine' =>
            'decimal:2',

    ];
}