<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class FacultyProfile extends Model
{
    use HasFactory;

    protected $fillable = [
        'user_id',
        'name',
        'email',
        'phone_number',
        'vidhvan_id',
        'google_scholar_id',
        'linkedin_id',
        'designation',
        'salutation',
        'qualification',
        'address',
        'employee_id',
        'department_name',
        'programme_name',
        'date_of_joining',
        'profile_photo_path',
    ];

    protected $casts = [
        'qualification' => 'array',
        'date_of_joining' => 'date',
    ];

    // Each profile belongs to one user
    public function user()
    {
        return $this->belongsTo(User::class);
    }
}
