Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
priyadi committed Jul 22, 2024
1 parent a8efac4 commit 45f6a6b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/03-tutorial/01-domain/01-entity.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ class Post extends AbstractAggregateRoot
string $title,
string $content,
) {
parent::__construct();

$this->title = $title;
$this->createdTime = new DatePoint();
}
Expand Down Expand Up @@ -121,6 +123,8 @@ class Comment extends AbstractEntity

public function __construct(string $content)
{
parent::__construct();

$this->content = $content;
$this->createdTime = new DatePoint();
}
Expand Down
8 changes: 8 additions & 0 deletions docs/03-tutorial/01-domain/06-bekerja.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ sedangkan repository kita bisa menggunakan `Repository::add()`.

:::

:::info

Setiap entity memiliki ID dalam format UUIDv7 yang dapat diperoleh dengan cara
`$entity->getId()`. ID ini digenerate oleh aplikasi, bukan database, dan sudah
tersedia sejak entity pertama kali dibuat.

:::

## Mengambil `Post` dari Database

```php
Expand Down

0 comments on commit 45f6a6b

Please sign in to comment.