*/ final readonly class RequestedCoupon implements AggregateRoot, HasTimestampIdentifier { private function __construct( public RequestedCouponId $id, public CouponName $name, public CouponProductName $productName, public RequestedCouponQuantity $quantity, public WarningThresholdQuantity $warningThresholdQuantity, public Period $period, public MoneyAmount $moneyAmount, public ProcessingCode $processingCode, public CouponPicture $couponPicture, public GS1 $gs1, public CouponValidity $couponValidity, public ?\DateTimeInterface $updatedAt = null, ) { } public function id(): RequestedCouponId { return $this->id; } public function createdAt(): \DateTimeInterface { return $this->id->toDateTime(); } public function updatedAt(): ?\DateTimeInterface { return $this->updatedAt; } public static function hydrate( RequestedCouponId $id, CouponName $name, CouponProductName $productName, RequestedCouponQuantity $quantity, WarningThresholdQuantity $warningThresholdQuantity, Period $period, MoneyAmount $moneyAmount, ProcessingCode $processingCode, CouponPicture $couponPicture, GS1 $gs1, CouponValidity $couponValidity, ?\DateTimeInterface $updatedAt = null, ): self { return new self( id: $id, name: $name, productName: $productName, quantity: $quantity, warningThresholdQuantity: $warningThresholdQuantity, period: $period, moneyAmount: $moneyAmount, processingCode: $processingCode, couponPicture: $couponPicture, gs1: $gs1, couponValidity: $couponValidity, updatedAt: $updatedAt, ); } }