83 lines
1.8 KiB
PHP
83 lines
1.8 KiB
PHP
<?php
|
|
|
|
namespace App\Entity;
|
|
|
|
use App\Repository\PostalCodeInquiryRepository;
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
#[ORM\Entity(repositoryClass: PostalCodeInquiryRepository::class)]
|
|
#[ORM\Table(name: 'postal_code_inquiry')]
|
|
class PostalCodeInquiry
|
|
{
|
|
#[ORM\Id]
|
|
#[ORM\GeneratedValue]
|
|
#[ORM\Column]
|
|
private ?int $id = null;
|
|
|
|
#[ORM\Column(length: 10, unique: true)]
|
|
private ?string $postalCode = null;
|
|
|
|
#[ORM\Column(type: 'json')]
|
|
private array $addressData = [];
|
|
|
|
#[ORM\Column]
|
|
private ?\DateTimeImmutable $createdAt = null;
|
|
|
|
#[ORM\Column]
|
|
private ?\DateTimeImmutable $updatedAt = null;
|
|
|
|
public function __construct()
|
|
{
|
|
$this->createdAt = new \DateTimeImmutable();
|
|
$this->updatedAt = new \DateTimeImmutable();
|
|
}
|
|
|
|
public function getId(): ?int
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
public function getPostalCode(): ?string
|
|
{
|
|
return $this->postalCode;
|
|
}
|
|
|
|
public function setPostalCode(string $postalCode): static
|
|
{
|
|
$this->postalCode = $postalCode;
|
|
return $this;
|
|
}
|
|
|
|
public function getAddressData(): array
|
|
{
|
|
return $this->addressData;
|
|
}
|
|
|
|
public function setAddressData(array $addressData): static
|
|
{
|
|
$this->addressData = $addressData;
|
|
return $this;
|
|
}
|
|
|
|
public function getCreatedAt(): ?\DateTimeImmutable
|
|
{
|
|
return $this->createdAt;
|
|
}
|
|
|
|
public function setCreatedAt(\DateTimeImmutable $createdAt): static
|
|
{
|
|
$this->createdAt = $createdAt;
|
|
return $this;
|
|
}
|
|
|
|
public function getUpdatedAt(): ?\DateTimeImmutable
|
|
{
|
|
return $this->updatedAt;
|
|
}
|
|
|
|
public function setUpdatedAt(\DateTimeImmutable $updatedAt): static
|
|
{
|
|
$this->updatedAt = $updatedAt;
|
|
return $this;
|
|
}
|
|
}
|