feat(monorepo): migrate to typescript monorepo

This commit is contained in:
2025-11-07 17:09:29 +02:00
committed by BernardNganduDev
parent 3e09956f05
commit 075a388ccb
745 changed files with 2341 additions and 5082 deletions
@@ -0,0 +1,40 @@
<?php
declare(strict_types=1);
namespace Basango\FeedManagement\Application\ReadModel;
use Basango\FeedManagement\Domain\Model\Identity\BookmarkId;
use Basango\SharedKernel\Domain\DataTransfert\DataMapping;
/**
* Class Bookmark.
*
* @author bernard-ng <bernard@devscast.tech>
*/
final readonly class Bookmark
{
public function __construct(
public BookmarkId $id,
public string $name,
public \DateTimeImmutable $createdAt,
public ?string $description = null,
public int $articlesCount = 0,
public bool $isPublic = false,
public ?\DateTimeImmutable $updatedAt = null
) {
}
public static function create(array $item): self
{
return new self(
BookmarkId::fromString(DataMapping::string($item, 'bookmark_id')),
DataMapping::string($item, 'bookmark_name'),
DataMapping::datetime($item, 'bookmark_created_at'),
DataMapping::nullableString($item, 'bookmark_description'),
DataMapping::integer($item, 'bookmark_articles_count'),
DataMapping::boolean($item, 'bookmark_is_public'),
DataMapping::nullableDatetime($item, 'bookmark_updated_at')
);
}
}