Skeleton is ready

This commit is contained in:
2026-01-05 16:33:20 +04:00
commit eeaf43ab5d
89 changed files with 2704 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
<?php
declare(strict_types=1);
namespace App\Shared\Event\User;
class Created
{
private string $userId;
private string $createdAt;
public function __construct(string $userId, string $createdAt)
{
$this->userId = $userId;
$this->createdAt = $createdAt;
}
public function getUserId(): string
{
return $this->userId;
}
public function getCreatedAt(): string
{
return $this->createdAt;
}
}

View File

@@ -0,0 +1,27 @@
<?php
declare(strict_types=1);
namespace App\Shared\Event\User;
class Deleted
{
private string $userId;
private string $deletedAt;
public function __construct(string $userId, string $deletedAt)
{
$this->userId = $userId;
$this->deletedAt = $deletedAt;
}
public function getUserId(): string
{
return $this->userId;
}
public function getDeletedAt(): string
{
return $this->deletedAt;
}
}

View File

@@ -0,0 +1,27 @@
<?php
declare(strict_types=1);
namespace App\Shared\Event\User;
class Updated
{
private string $userId;
private string $updatedAt;
public function __construct(string $userId, string $updatedAt)
{
$this->userId = $userId;
$this->updatedAt = $updatedAt;
}
public function getUserId(): string
{
return $this->userId;
}
public function getUpdatedAt(): string
{
return $this->updatedAt;
}
}

View File

@@ -0,0 +1,22 @@
<?php
declare(strict_types=1);
namespace App\Shared\Service\User;
use App\Models\User\User;
class SearchById implements SearchByIdContract
{
/**
* @param string $id
*
* @return \App\Models\User\User
*
* @throws \Illuminate\Database\Eloquent\ModelNotFoundException
*/
public function getById(string $id): User
{
return User::findOrFail($id);
}
}

View File

@@ -0,0 +1,12 @@
<?php
declare(strict_types=1);
namespace App\Shared\Service\User;
use App\Models\User\User;
interface SearchByIdContract
{
public function getById(string $id): User;
}