src/Entity/Contact.php line 18

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Knp\DoctrineBehaviors\Contract\Entity\SoftDeletableInterface;
  5. use Knp\DoctrineBehaviors\Contract\Entity\TimestampableInterface;
  6. use Knp\DoctrineBehaviors\Model\SoftDeletable\SoftDeletableTrait;
  7. use Knp\DoctrineBehaviors\Model\Timestampable\TimestampableTrait;
  8. use Symfony\Component\Validator\Constraints as Assert;
  9. /**
  10.  * Contact
  11.  *
  12.  * @ORM\Table(name="contact_contact")
  13.  * @ORM\Entity(repositoryClass="App\Repository\ContactRepository")
  14.  */
  15. class Contact implements TimestampableInterfaceSoftDeletableInterface
  16. {
  17.     use TimestampableTrait,
  18.         SoftDeletableTrait;
  19.     /**
  20.      * @var int
  21.      *
  22.      * @ORM\Column(name="id", type="integer")
  23.      * @ORM\Id
  24.      * @ORM\GeneratedValue(strategy="AUTO")
  25.      */
  26.     private $id;
  27.     /**
  28.      * @var string
  29.      *
  30.      * @ORM\Column(name="name", type="string", length=255, nullable=true)
  31.      */
  32.     private $name;
  33.     /**
  34.      * @var string
  35.      *
  36.      * @Assert\Email(
  37.      *     message = "The email '{{ value }}' is not a valid email."
  38.      * )
  39.      * @ORM\Column(name="email", type="string", length=255, nullable=true)
  40.      */
  41.     private $email;
  42.     /**
  43.      * @var string
  44.      *
  45.      * @ORM\Column(name="phone", type="string", length=255, nullable=true)
  46.      */
  47.     private $phone;
  48.     /**
  49.      * @var string
  50.      *
  51.      * @ORM\Column(name="address", type="string", length=255, nullable=true)
  52.      */
  53.     private $address;
  54.     /**
  55.      * @var string
  56.      *
  57.      * @ORM\Column(name="zip_code", type="string", length=255, nullable=true)
  58.      */
  59.     private $zipCode;
  60.     /**
  61.      * @var string
  62.      *
  63.      * @ORM\Column(name="city", type="string", length=255, nullable=true)
  64.      */
  65.     private $city;
  66.     /**
  67.      * @var string
  68.      *
  69.      * @ORM\Column(name="message", type="text", nullable=true)
  70.      */
  71.     private $message;
  72.     /**
  73.      * Get id
  74.      *
  75.      * @return int
  76.      */
  77.     public function getId()
  78.     {
  79.         return $this->id;
  80.     }
  81.     /**
  82.      * Set name
  83.      *
  84.      * @param string $name
  85.      *
  86.      * @return Contact
  87.      */
  88.     public function setName($name)
  89.     {
  90.         $this->name $name;
  91.         return $this;
  92.     }
  93.     /**
  94.      * Get name
  95.      *
  96.      * @return string
  97.      */
  98.     public function getName()
  99.     {
  100.         return $this->name;
  101.     }
  102.     /**
  103.      * Set email
  104.      *
  105.      * @param string $email
  106.      *
  107.      * @return Contact
  108.      */
  109.     public function setEmail($email)
  110.     {
  111.         $this->email $email;
  112.         return $this;
  113.     }
  114.     /**
  115.      * Get email
  116.      *
  117.      * @return string
  118.      */
  119.     public function getEmail()
  120.     {
  121.         return $this->email;
  122.     }
  123.     /**
  124.      * Set phone
  125.      *
  126.      * @param string $phone
  127.      *
  128.      * @return Contact
  129.      */
  130.     public function setPhone($phone)
  131.     {
  132.         $this->phone $phone;
  133.         return $this;
  134.     }
  135.     /**
  136.      * Get phone
  137.      *
  138.      * @return string
  139.      */
  140.     public function getPhone()
  141.     {
  142.         return $this->phone;
  143.     }
  144.     /**
  145.      * Set address
  146.      *
  147.      * @param string $address
  148.      *
  149.      * @return Contact
  150.      */
  151.     public function setAddress($address)
  152.     {
  153.         $this->address $address;
  154.         return $this;
  155.     }
  156.     /**
  157.      * Get address
  158.      *
  159.      * @return string
  160.      */
  161.     public function getAddress()
  162.     {
  163.         return $this->address;
  164.     }
  165.     /**
  166.      * Set zipCode
  167.      *
  168.      * @param string $zipCode
  169.      *
  170.      * @return Contact
  171.      */
  172.     public function setZipCode($zipCode)
  173.     {
  174.         $this->zipCode $zipCode;
  175.         return $this;
  176.     }
  177.     /**
  178.      * Get zipCode
  179.      *
  180.      * @return string
  181.      */
  182.     public function getZipCode()
  183.     {
  184.         return $this->zipCode;
  185.     }
  186.     /**
  187.      * Set city
  188.      *
  189.      * @param string $city
  190.      *
  191.      * @return Contact
  192.      */
  193.     public function setCity($city)
  194.     {
  195.         $this->city $city;
  196.         return $this;
  197.     }
  198.     /**
  199.      * Get city
  200.      *
  201.      * @return string
  202.      */
  203.     public function getCity()
  204.     {
  205.         return $this->city;
  206.     }
  207.     /**
  208.      * Set message
  209.      *
  210.      * @param string $message
  211.      *
  212.      * @return Contact
  213.      */
  214.     public function setMessage($message)
  215.     {
  216.         $this->message $message;
  217.         return $this;
  218.     }
  219.     /**
  220.      * Get message
  221.      *
  222.      * @return string
  223.      */
  224.     public function getMessage()
  225.     {
  226.         return $this->message;
  227.     }
  228. }