src/Entity/MessageEntity.php line 13
<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
/**
* @ORM\Entity
* @ORM\Table(name="messages")
*/
class MessageEntity
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $message;
/**
* @ORM\Column(type="date")
*/
private $date;
/**
* @ORM\Column(type="string", length=20)
*/
private $phone;
/**
* @ORM\Column(type="integer", length=2)
*/
private $status = 1;
/**
* @ORM\ManyToOne(targetEntity="UserEntity", inversedBy="messages")
* @ORM\JoinColumn(nullable=false)
*/
private $user;
public function getUser(): ?UserEntity
{
return $this->user;
}
public function setUser(?UserEntity $user): self
{
$this->user = $user;
return $this;
}
public function getId(): ?int
{
return $this->id;
}
public function setId(int $id): self
{
$this->id = $id;
return $this;
}
public function getMessage(): ?string
{
return $this->message;
}
public function setMessage(string $message): self
{
$this->message = $message;
return $this;
}
public function getDate(): ?\DateTimeInterface
{
return $this->date;
}
public function setDate(\DateTimeInterface $date): self
{
$this->date = $date;
return $this;
}
public function getPhone(): ?int
{
return $this->phone;
}
public function setPhone(int $phone): self
{
$this->phone = $phone;
return $this;
}
public function getStatus(): ?int
{
return $this->status;
}
public function setStatus(int $status): self
{
$this->status = $status;
return $this;
}
}