File size: 766 Bytes
cf14c12 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | <?php
declare(strict_types=1);
namespace Stat\Domain\Entities;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Shared\Domain\ValueObjects\CountryCode;
use Stat\Domain\ValueObjects\Metric;
#[ORM\Entity]
class SignupStatEntity extends AbstractStatEntity
{
#[ORM\Column(type: Types::STRING, enumType: CountryCode::class, name: 'country_code', nullable: true)]
private ?CountryCode $countryCode = null;
public function __construct(
?CountryCode $countryCode = null
) {
parent::__construct();
$this->incrementMetric(
new Metric(1)
);
$this->countryCode = $countryCode;
}
public function getCountryCode(): ?CountryCode
{
return $this->countryCode;
}
}
|