| @@ 19-39 (lines=21) @@ | ||
| 16 | ||
| 17 | use Kreta\SharedKernel\Domain\Model\DomainEvent; |
|
| 18 | ||
| 19 | class ProjectCreated implements DomainEvent |
|
| 20 | { |
|
| 21 | private $id; |
|
| 22 | private $occurredOn; |
|
| 23 | ||
| 24 | public function __construct(ProjectId $id) |
|
| 25 | { |
|
| 26 | $this->id = $id; |
|
| 27 | $this->occurredOn = new \DateTimeImmutable(); |
|
| 28 | } |
|
| 29 | ||
| 30 | public function occurredOn() : \DateTimeInterface |
|
| 31 | { |
|
| 32 | return $this->occurredOn; |
|
| 33 | } |
|
| 34 | ||
| 35 | public function id() |
|
| 36 | { |
|
| 37 | return $this->id; |
|
| 38 | } |
|
| 39 | } |
|
| 40 | ||
| @@ 19-39 (lines=21) @@ | ||
| 16 | ||
| 17 | use Kreta\SharedKernel\Domain\Model\DomainEvent; |
|
| 18 | ||
| 19 | class ProjectEdited implements DomainEvent |
|
| 20 | { |
|
| 21 | private $id; |
|
| 22 | private $occurredOn; |
|
| 23 | ||
| 24 | public function __construct(ProjectId $id) |
|
| 25 | { |
|
| 26 | $this->id = $id; |
|
| 27 | $this->occurredOn = new \DateTimeImmutable(); |
|
| 28 | } |
|
| 29 | ||
| 30 | public function occurredOn() : \DateTimeInterface |
|
| 31 | { |
|
| 32 | return $this->occurredOn; |
|
| 33 | } |
|
| 34 | ||
| 35 | public function id() |
|
| 36 | { |
|
| 37 | return $this->id; |
|
| 38 | } |
|
| 39 | } |
|
| 40 | ||
| @@ 19-39 (lines=21) @@ | ||
| 16 | ||
| 17 | use Kreta\SharedKernel\Domain\Model\DomainEvent; |
|
| 18 | ||
| 19 | class UserSignedUp implements DomainEvent |
|
| 20 | { |
|
| 21 | private $userId; |
|
| 22 | private $occurredOn; |
|
| 23 | ||
| 24 | public function __construct(UserId $userId) |
|
| 25 | { |
|
| 26 | $this->userId = $userId; |
|
| 27 | $this->occurredOn = new \DateTimeImmutable(); |
|
| 28 | } |
|
| 29 | ||
| 30 | public function userId() : UserId |
|
| 31 | { |
|
| 32 | return $this->userId; |
|
| 33 | } |
|
| 34 | ||
| 35 | public function occurredOn() : \DateTimeInterface |
|
| 36 | { |
|
| 37 | return $this->occurredOn; |
|
| 38 | } |
|
| 39 | } |
|
| 40 | ||