<?php

namespace App\Models;

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

class UserDetail extends Model
{
    use HasFactory;

    protected $table = 'user_details';

    protected $fillable = [
        'userCode',
        'nationalID',
        'fullname',
        'phone',
        'email',
        'address',
        'username',
        'password',
    ];

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