<?php

namespace App\Modules\HR\Performance\Models;

use App\Modules\Admin\Tenancy\Traits\BelongsToTenant;
use Illuminate\Database\Eloquent\Model;

class PerformanceReview extends Model
{
    use BelongsToTenant;

    protected $table = 'hr_performance_reviews';

    protected $guarded = ['id'];

    protected function casts(): array
    {
        return [
            'goals' => 'array', 'kpis' => 'array', 'reviewed_at' => 'datetime',
            'promotion_recommended' => 'boolean', 'training_recommended' => 'boolean',
            'self_score' => 'decimal:2', 'manager_score' => 'decimal:2', 'final_score' => 'decimal:2',
        ];
    }
}
