<?php
namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class BonusPayout extends Model
{
    protected $fillable = [
        'bonus_setup_id',
        'employee_id',
        'appraisal_review_id',
        'target_amount',
        'payout_amount',
        'multiplier',
        'performance_score',
        'payout_date',
        'status',
        'notes',
    ];

    public function setup()
    {
        return $this->belongsTo(BonusSetup::class, 'bonus_setup_id');
    }

    public function employee()
    {
        return $this->belongsTo(Employee::class);
    }

    public function appraisalReview()
    {
        return $this->belongsTo(AppraisalReview::class);
    }
}
