Presubscription.php 662B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace Muzich\CoreBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Gedmo\Mapping\Annotation as Gedmo;
  5. use Symfony\Component\Validator\Constraints as Assert;
  6. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  7. /**
  8. * @ORM\Entity
  9. * @ORM\Table(name="presubscription")
  10. * @UniqueEntity("email")
  11. */
  12. class Presubscription
  13. {
  14. /**
  15. * @ORM\Id
  16. * @ORM\Column(type="integer")
  17. * @ORM\GeneratedValue(strategy="AUTO")
  18. * @var type int
  19. */
  20. protected $id;
  21. /**
  22. * @ORM\Column(type="string", length=255, unique=true, nullable=false)
  23. * @Assert\NotBlank()
  24. * @Assert\Email()
  25. * @var type string
  26. */
  27. public $email;
  28. }