src/Entity/Message.php line 15
<?php
namespace App\Entity;
use App\Repository\MessageRepository;
use Doctrine\DBAL\Types\Type;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Timestampable\Traits\TimestampableEntity;
use Symfony\Component\Mime\Email;
use Symfony\Component\Validator\Constraints as Assert;
#[ORM\Entity(repositoryClass: MessageRepository::class)]
#[ORM\Table(name: '`messages`')]
class Message
{
use TimestampableEntity;
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[Assert\Length(max: 20)]
#[ORM\Column(length: 20)]
private ?string $name = null;
#[Assert\Length(max: 100)]
#[ORM\Column(length: 100)]
private ?string $email = null;
#[ORM\Column(type: Types::TEXT)]
private ?string $body = null;
#[ORM\Column]
private ?bool $is_read = false;
#[ORM\Column]
private ?int $phone = null;
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 getBody(): ?string
{
return $this->body;
}
public function setBody(string $body): self
{
$this->body = $body;
return $this;
}
public function getIsRead(): ?bool
{
return $this->is_read;
}
public function setIsRead(?bool $is_read): self
{
$this->is_read = $is_read;
return $this;
}
public function getPhone(): ?int
{
return $this->phone;
}
public function setPhone(int $phone): self
{
$this->phone = $phone;
return $this;
}
}