<?php

namespace App\Models;

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

class GradingScale extends Model
{
    use SoftDeletes;

    protected $fillable = [
        'name',
        'code',
        'min_score',
        'max_score',
        'grade_letter',
        'grade_point',
        'remarks',
        'is_active',
    ];

    protected function casts(): array
    {
        return [
            'min_score' => 'decimal:2',
            'max_score' => 'decimal:2',
            'is_active' => 'boolean',
        ];
    }
}
