Post: id, userId (fk -> User), title, body, createdAt as DateTimeImmutable. CreatePostDto readonly with explicit createdAt (use case supplies it via Clock; entity remains pure). PostRepository: create, find, findByUserId, findRecent (limit), delete. |
||
|---|---|---|
| .. | ||
| CreatePostDto.php | ||
| Post.php | ||
| PostRepository.php | ||