Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace My\MoviesBundle\Entity;
- use Doctrine\ORM\Mapping as ORM;
- use Gedmo\Mapping\Annotation as Gedmo;
- /**
- * Orders
- *
- * @ORM\Table()
- * @ORM\Entity(repositoryClass="My\MoviesBundle\Entity\OrdersRepository")
- */
- class Orders
- {
- /**
- * @var integer
- * @ORM\Column(name="id", type="integer")
- * @ORM\Id
- * @ORM\GeneratedValue(strategy="AUTO")
- */
- private $id;
- /**
- * @var Entity User
- * @ORM\OneToOne(targetEntity="\Application\Sonata\UserBundle\Entity\User", inversedBy="order")
- */
- private $user;
- /**
- * @ORM\OneToMany(targetEntity="MovieHasOrder", mappedBy="order", cascade={"all"})
- */
- private $orderMovie;
- /**
- * @ORM\Column(name="status", type="string", length=255)
- * @var string
- */
- private $status;
- /**
- * @var Entity Address
- * @ORM\OneToOne(targetEntity="\My\DefaultBundle\Entity\Address")
- */
- private $address;
- /**
- * @var Entity Carrier
- * @ORM\OneToOne(targetEntity="\My\DefaultBundle\Entity\Carrier")
- */
- private $carrier;
- /**
- * @ORM\Column(name="note", type="text", nullable=true)
- * @var string
- */
- private $note;
- /**
- * @var datetime $date
- * @ORM\Column(type="date")
- * @Gedmo\Timestampable(on="update")
- */
- private $date;
- /**
- * @var string $session
- * @ORM\Column(name="session", type="string", length=26, unique=true)
- */
- private $session;
- /**
- * Constructor
- */
- public function __construct()
- {
- $this->orderMovie = new \Doctrine\Common\Collections\ArrayCollection();
- }
- /**
- * Get id
- * @return integer
- */
- public function getId()
- {
- return $this->id;
- }
- /**
- * Set status
- * @param string $status
- * @return Orders
- */
- public function setStatus($status)
- {
- $this->status = $status;
- return $this;
- }
- /**
- * Get status
- * @return string
- */
- public function getStatus()
- {
- return $this->status;
- }
- /**
- * Set user
- * @param \Application\Sonata\UserBundle\Entity\User $user
- * @return Orders
- */
- public function setUser(\Application\Sonata\UserBundle\Entity\User $user = null)
- {
- $this->user = $user;
- return $this;
- }
- /**
- * Get user
- * @return \Application\Sonata\UserBundle\Entity\User
- */
- public function getUser()
- {
- return $this->user;
- }
- /**
- * Add orderMovie
- * @param \My\MoviesBundle\Entity\MovieHasOrder $orderMovie
- * @return Orders
- */
- public function addOrderMovie(\My\MoviesBundle\Entity\MovieHasOrder $orderMovie)
- {
- $this->orderMovie[] = $orderMovie;
- return $this;
- }
- /**
- * Remove orderMovie
- * @param \My\MoviesBundle\Entity\MovieHasOrder $orderMovie
- */
- public function removeOrderMovie(\My\MoviesBundle\Entity\MovieHasOrder $orderMovie)
- {
- $this->orderMovie->removeElement($orderMovie);
- }
- /**
- * Get orderMovie
- * @return \Doctrine\Common\Collections\Collection
- */
- public function getOrderMovie()
- {
- return $this->orderMovie;
- }
- /**
- * Set address
- * @param \My\DefaultBundle\Entity\Address $address
- * @return Orders
- */
- public function setAddress(\My\DefaultBundle\Entity\Address $address = null)
- {
- $this->address = $address;
- return $this;
- }
- /**
- * Get address
- * @return \My\DefaultBundle\Entity\Address
- */
- public function getAddress()
- {
- return $this->address;
- }
- /**
- * Set carrier
- * @param \My\DefaultBundle\Entity\Carrier $carrier
- * @return Orders
- */
- public function setCarrier(\My\DefaultBundle\Entity\Carrier $carrier = null)
- {
- $this->carrier = $carrier;
- return $this;
- }
- /**
- * Get carrier
- * @return \My\DefaultBundle\Entity\Carrier
- */
- public function getCarrier()
- {
- return $this->carrier;
- }
- /**
- * Set note
- * @param string $note
- * @return Orders
- */
- public function setNote($note)
- {
- $this->note = $note;
- return $this;
- }
- /**
- * Get note
- * @return string
- */
- public function getNote()
- {
- return $this->note;
- }
- /**
- * Set date
- * @param \DateTime $date
- * @return Orders
- */
- public function setDate($date)
- {
- $this->date = $date;
- return $this;
- }
- /**
- * Get date
- * @return \DateTime
- */
- public function getDate()
- {
- return $this->date;
- }
- /**
- * Set session
- * @param string $session
- * @return Orders
- */
- public function setSession($session)
- {
- $this->session = $session;
- return $this;
- }
- /**
- * Get session
- * @return string
- */
- public function getSession()
- {
- return $this->session;
- }
- public function __toString() {
- return 'ORDERS TO STRING';
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement