Initial commit

This commit is contained in:
2026-02-06 23:26:56 +07:00
commit d6022b9bca
92 changed files with 41386 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
<?php
declare(strict_types=1);
namespace App\Data\Auth;
use App\Enums\LoginError;
use App\Models\User;
final readonly class LoginResult
{
public function __construct(
public ?User $user,
public ?string $token,
public ?LoginError $error = null
) {
}
public static function success(User $user, string $token): self
{
return new self($user, $token, null);
}
public static function error(LoginError $error): self
{
return new self(null, null, $error);
}
}