Advertisement
Guest User

Untitled

a guest
Apr 21st, 2015
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. <?php
  2.  
  3. namespace AppBundle\Entity;
  4.  
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Component\Validator\Constraints as Assert;
  7.  
  8. /**
  9. * Class Campaign
  10. * @package AppBundle\Entity
  11. * @ORM\Entity
  12. * @ORM\Table
  13. */
  14. class Campaign
  15. {
  16. // ....
  17.  
  18. /**
  19. * Image representing the sponsor of the campaign
  20. * @var Image
  21. * @ORM\ManyToOne(targetEntity="Image", cascade={"all"})
  22. * @Assert\Valid
  23. */
  24. protected $logoImage;
  25.  
  26. /**
  27. * Image representing the campaign
  28. * @var Image
  29. * @ORM\ManyToOne(targetEntity="Image", cascade={"all"})
  30. * @Assert\NotBlank
  31. * @Assert\Valid
  32. */
  33. protected $heroImage;
  34.  
  35. // ...
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement