<?php

namespace App\Models;

use Laravel\Sanctum\PersonalAccessToken as SanctumPersonalAccessToken;
use Modules\Role\Entities\Role;

class PersonalAccessToken extends SanctumPersonalAccessToken
{
    protected $fillable = [
        'name',
        'token',
        'abilities',
        'expires_at',
        'active_role_id',
    ];

    public function activeRole()
    {
        return $this->belongsTo(Role::class, 'active_role_id');
    }
}
