Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // src/Multimedia/AccountBundle/Entity/Zdjecia.php
- namespace Multimedia\AccountBundle\Entity;
- use Doctrine\ORM\Mapping as ORM;
- use Symfony\Component\Validator\Constraints as Assert;
- use Symfony\Component\HttpFoundation\File\File;
- use Vich\UploaderBundle\Mapping\Annotation as Vich;
- //use Doctrine\Common\Collections\ArrayCollection;
- /**
- * @ORM\Entity
- * @ORM\Table(name="zdjecia")
- * @ORM\HasLifecycleCallbacks
- * @Vich\Uploadable
- *
- */
- class Zdjecia
- {
- /**
- * @var integer $idzdjecia
- *
- * @ORM\Column(name="idzdjecia", type="integer")
- * @ORM\Id
- * @ORM\GeneratedValue(strategy="AUTO")
- */
- private $idzdjecia;
- /**
- * @Assert\File(
- * maxSize="1M",
- * mimeTypes={"image/png", "image/jpeg", "image/pjpeg"}
- * )
- * @Vich\UploadableField(mapping="zdjecia_image", fileNameProperty="imageName")
- *
- * @var File $image
- */
- protected $image;
- /**
- * @ORM\Column(type="string", length=255, name="image_name")
- *
- * @var string $imageName
- */
- protected $imageName;
- /**
- * @var integer $idzwierzatka
- * @ORM\Column(name="idzwierzatka", type="integer", length=10 )
- */
- private $idzwierzatka;
- /**
- * @ORM\Column(type="string", length=255, nullable=true)
- */
- public $path;
- /**
- * Get idzdjecia
- *
- * @return integer
- */
- public function getIdzdjecia()
- {
- return $this->idzdjecia;
- }
- /**
- * Set image
- *
- * @param string $image
- */
- public function setImage($image)
- {
- $this->image = $image;
- }
- /**
- * Get image
- *
- * @return string
- */
- public function getImage()
- {
- return $this->image;
- }
- /**
- * Set idzwierzatka
- *
- * @param integer $idzwierzatka
- */
- public function setIdzwierzatka($idzwierzatka)
- {
- $this->idzwierzatka = $idzwierzatka;
- }
- /**
- * Get idzwierzatka
- *
- * @return integer
- */
- public function getIdzwierzatka()
- {
- return $this->idzwierzatka;
- }
- /**
- * Set path
- *
- * @param string $path
- */
- public function setPath($path)
- {
- $this->path = $path;
- }
- /**
- * Get path
- *
- * @return string
- */
- public function getPath()
- {
- return $this->path;
- }
- /**
- * Set imageName
- *
- * @param string $imageName
- * @return Zdjecia
- */
- public function setImageName($imageName)
- {
- $this->imageName = $imageName;
- return $this;
- }
- /**
- * Get imageName
- *
- * @return string
- */
- public function getImageName()
- {
- return $this->imageName;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement