Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace AppBundle\Entity;
- use Doctrine\ORM\Mapping as ORM;
- use Symfony\Component\Validator\Constraints as Assert;
- /**
- * Class Campaign
- * @package AppBundle\Entity
- * @ORM\Entity
- * @ORM\Table
- */
- class Campaign
- {
- // ....
- /**
- * Image representing the sponsor of the campaign
- * @var Image
- * @ORM\ManyToOne(targetEntity="Image", cascade={"all"})
- * @Assert\Valid
- */
- protected $logoImage;
- /**
- * Image representing the campaign
- * @var Image
- * @ORM\ManyToOne(targetEntity="Image", cascade={"all"})
- * @Assert\NotBlank
- * @Assert\Valid
- */
- protected $heroImage;
- // ...
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement