<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class JobApplication extends Model
{
    protected $fillable = [
        'job_listing_id',
        'full_name',
        'email',
        'phone',
        'cover_note',
        'cv_media_id',
        'status',
        'review_notes',
    ];

    public function job(): BelongsTo
    {
        return $this->belongsTo(JobListing::class, 'job_listing_id');
    }

    public function cvMedia(): BelongsTo
    {
        return $this->belongsTo(Media::class, 'cv_media_id');
    }
}
