﻿<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class AppraisalReviewFeedback extends Model
{
    protected $table = 'appraisal_review_feedback';
    protected $fillable = [
        'appraisal_review_id',
        'simple_goal_id',
        'giver_role',
        'rating_value',
        'competency_id',
        'comment',
        'organisation_id',
        'feedback_by',
    ];


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

    public function giverUser()
    {
        return $this->belongsTo(User::class, 'feedback_by');
    }

    public function simpleGoal()
    {
        return $this->belongsTo(SimpleGoal::class);
    }
