<?php

namespace App\Models;

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

class Profile extends Model
{
    public $timestamps = false;
    protected $primaryKey = 'user_id';
    public $incrementing = false;
    protected $keyType = 'string';

    protected $fillable = [
        'user_id',
        'display_name',
        'avatar',
        'locale',
        'currency',
        'onboarding_completed_at',
        'onboarding_variant',
        'onboarding_group_id',
        'default_space_id',
        'updated_at',
    ];

    protected $casts = [
        'onboarding_completed_at' => 'datetime',
        'updated_at' => 'datetime',
    ];

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

