<?php

declare(strict_types=1);

namespace ImovelZapAi\Authentication\Infrastructure\Persistence\Eloquent;

use ImovelZapAi\Authentication\Domain\Entities\Permission as PermissionEntity;
use Spatie\Permission\Models\Permission as SpatiePermission;

class PermissionModel extends SpatiePermission
{
    public function toDomainEntity(): PermissionEntity
    {
        return new PermissionEntity(
            id: $this->getKey(),
            name: $this->name,
            guardName: $this->guard_name,
        );
    }
}
