23 lines
494 B
PHP
23 lines
494 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
declare(strict_types=1);
|
||
|
|
|
||
|
|
namespace Domain\Models\ValueObjects;
|
||
|
|
|
||
|
|
use Shared\DDD\Models\Equatable;
|
||
|
|
|
||
|
|
final readonly class CouponPicture implements Equatable
|
||
|
|
{
|
||
|
|
public function __construct(
|
||
|
|
public PicturePath $product,
|
||
|
|
public PicturePath $thumbnail
|
||
|
|
) {
|
||
|
|
}
|
||
|
|
|
||
|
|
#[\Override]
|
||
|
|
public function equals(mixed $other): bool
|
||
|
|
{
|
||
|
|
return $other instanceof self && $this->product->equals($other->product) && $this->thumbnail->equals($other->thumbnail);
|
||
|
|
}
|
||
|
|
}
|