<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Notifications\Notifiable;
use Laravel\Sanctum\HasApiTokens;
use Spatie\Permission\Traits\HasRoles;

class UserProfile extends Model
{
    protected $fillable = [
        'user_id',
        'blood_group',
        'pan_card_no',
        'aadhaar_card_no',
        'bank_name',
        'bank_account_no',
        'bank_ifsc_code',
        'emergency_contact_name',
        'emergency_contact_no',
        'emergency_contact_relation',
        'caller_id',
        'whatsapp_api_key',
        'date_of_birth',
        'joining_date',
        'provisional_duration',
        'salary',
        'created_at',
        'updated_at',
        'deleted_at',
    ];

    protected $casts = [
        'date_of_birth' => 'date',
    ];

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