* @category Class * @license https://www.gnu.org/licenses/lgpl-3.0.en.html GNU Lesser General Public License * @link www.splendidbear.org * @since 2026. 04. 15. */ #[Entity(repositoryClass: ContactMessageRepository::class)] #[Table(name: 'contact_messages')] class ContactMessage { #[Id, GeneratedValue, Column] private ?int $id = null; #[Column] private string $name; #[Column] private string $email; #[Column(type: Types::TEXT)] private string $content; #[Column] private bool $consent = false; #[Column] private DateTimeImmutable $createdAt; #[Column(length: 45, nullable: true)] private ?string $ipAddress = null; public function __construct() { $this->createdAt = new DateTimeImmutable(); } public function getId(): ?int { return $this->id; } public function getName(): string { return $this->name; } public function setName(string $name): self { $this->name = $name; return $this; } public function getEmail(): string { return $this->email; } public function setEmail(string $email): self { $this->email = $email; return $this; } public function getContent(): string { return $this->content; } public function setContent(string $content): self { $this->content = $content; return $this; } public function isConsent(): bool { return $this->consent; } public function setConsent(bool $consent): self { $this->consent = $consent; return $this; } public function getCreatedAt(): DateTimeImmutable { return $this->createdAt; } public function getIpAddress(): ?string { return $this->ipAddress; } public function setIpAddress(?string $ipAddress): self { $this->ipAddress = $ipAddress; return $this; } }