<?php

namespace App;

use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
 * Class TrainingRequest
 * @mixin Builder
 * @package App
 */
class TrainingRequest extends Model
{
    use SoftDeletes;

    protected $fillable = [
        'user_id',
        'purpose_training_id',
        'name',
        'email',
        'phone',
        'university',
        'graduation_date',
        'birth_date',
        'cv',
        'certifications',
    ];

    protected $casts = ['certifications' => 'array', 'cv' => 'array'];

    public function user()
    {
        return $this->belongsTo(User::class);
    }
}
