<?php

namespace App\Models;

use App\Enums\Gender;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class UserProfile extends Model
{
    /** @use HasFactory<\Database\Factories\UserProfileFactory> */
    use HasFactory;

    /**
     * The attributes that are mass assignable.
     *
     * @var list<string>
     */
    protected $fillable = [
        'firstname',
        'lastname',
        'birth_year',
        'gender',
        'professional_role',
        'experience',
        'practice_setting',
        'country',
        'colonoscopy_experience',
        'area_of_interest',
        'annual_colonoscopy_volume',
    ];

    /**
     * The attributes that should be hidden for serialization.
     *
     * @var list<string>
     */
    protected $hidden = [

    ];

    /**
     * Get the attributes that should be cast.
     *
     * @return array<string, string>
     */
    protected function casts(): array
    {
        return [
            'firstname' => 'string',
            'lastname' => 'string',
            'birth_year' => 'integer',
            'gender' => Gender::class,
            'professional_role' => 'string',
            'experience' => 'string',
            'practice_setting' => 'string',
            'country' => 'string',
            'colonoscopy_experience' => 'string',
            'area_of_interest' => 'string',
            'annual_colonoscopy_volume' => 'string',
        ];
    }
}
