Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.19 KB | None | 0 0
  1. <?php
  2.  
  3. namespace OC\BookingBundle\Entity;
  4.  
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\ORM\Mapping as ORM;
  7.  
  8. /**
  9.  * Ticket
  10.  *
  11.  * @ORM\Table(name="ticket")
  12.  * @ORM\Entity(repositoryClass="OC\BookingBundle\Repository\TicketRepository")
  13.  */
  14. class Ticket
  15. {
  16.     public function __construct()
  17.     {
  18.         $this->booking = $this->getBooking();
  19.         $this->firstname = $this->getFirstname();
  20.         $this->lastname = $this->getLastname();
  21.         $this->birthdayDate = $this->getBirthdayDate();
  22.         $this->country = $this->getCountry();
  23.         $this->reducPrice = $this->getReducPrice();
  24.         $this->price = $this->getPrice();
  25.     }
  26.  
  27.     /**
  28.      * @var int
  29.      *
  30.      * @ORM\Column(name="id", type="integer")
  31.      * @ORM\Id
  32.      * @ORM\GeneratedValue(strategy="AUTO")
  33.      */
  34.     private $id;
  35.  
  36.     /**
  37.      * @ORM\ManyToOne(targetEntity="Booking", inversedBy="details", cascade={"persist"})
  38.      *@ORM\JoinColumn(name="bookingId", referencedColumnName="id")
  39.      */
  40.     private $booking;
  41.  
  42.     /**
  43.      * @var int
  44.      *
  45.      * @ORM\Column(name="bookingId", type="integer")
  46.      */
  47.     private $bookingId = 0;
  48.  
  49.     /**
  50.      * @var string
  51.      *
  52.      * @ORM\Column(name="firstname", type="string", length=255)
  53.      */
  54.     private $firstname;
  55.  
  56.     /**
  57.      * @var string
  58.      *
  59.      * @ORM\Column(name="lastname", type="string", length=255)
  60.      */
  61.     private $lastname;
  62.  
  63.     /**
  64.      * @var \DateTime
  65.      * @ORM\Column(name="birthdayDate", type="date")
  66.      */
  67.     private $birthdayDate;
  68.  
  69.  
  70.     /**
  71.      * @var string
  72.      *
  73.      * @ORM\Column(name="country", type="string")
  74.      */
  75.     private $country;
  76.  
  77.  
  78.     /**
  79.      * @var boolean
  80.      *
  81.      * @ORM\Column(name="reducPrice", type="boolean")
  82.      */
  83.     private $reducPrice;
  84.  
  85.     /**
  86.      * @var int
  87.      * @ORM\Column(name="price", type="integer")
  88.      */
  89.     private $price;
  90.  
  91.     /**
  92.      * Get id.
  93.      *
  94.      * @return int
  95.      */
  96.     public function getId()
  97.     {
  98.         return $this->id;
  99.     }
  100.  
  101.     /**
  102.      * Set bookingId.
  103.      *
  104.      * @param int $bookingId
  105.      *
  106.      * @return Ticket
  107.      */
  108.     public function setBookingId($bookingId)
  109.     {
  110.         $this->bookingId = $bookingId;
  111.  
  112.         return $this;
  113.     }
  114.  
  115.     /**
  116.      * Get bookingId.
  117.      *
  118.      * @return int
  119.      */
  120.     public function getBookingId()
  121.     {
  122.         return $this->bookingId;
  123.     }
  124.  
  125.     /**
  126.      * Set firstname.
  127.      *
  128.      * @param string $firstname
  129.      *
  130.      * @return Ticket
  131.      */
  132.     public function setFirstname($firstname)
  133.     {
  134.         $this->firstname = $firstname;
  135.  
  136.         return $this;
  137.     }
  138.  
  139.     /**
  140.      * Get firstname.
  141.      *
  142.      * @return string
  143.      */
  144.     public function getFirstname()
  145.     {
  146.         return $this->firstname;
  147.     }
  148.  
  149.     /**
  150.      * Set lastname.
  151.      *
  152.      * @param string $lastname
  153.      *
  154.      * @return Ticket
  155.      */
  156.     public function setLastname($lastname)
  157.     {
  158.         $this->lastname = $lastname;
  159.  
  160.         return $this;
  161.     }
  162.  
  163.     /**
  164.      * Get lastname.
  165.      *
  166.      * @return string
  167.      */
  168.     public function getLastname()
  169.     {
  170.         return $this->lastname;
  171.     }
  172.  
  173.     /**
  174.      * Set country.
  175.      *
  176.      * @param string $country
  177.      *
  178.      * @return Ticket
  179.      */
  180.     public function setCountry($country)
  181.     {
  182.         $this->country = $country;
  183.  
  184.         return $this;
  185.     }
  186.  
  187.     /**
  188.      * Get country.
  189.      *
  190.      * @return string
  191.      */
  192.     public function getCountry()
  193.     {
  194.         return $this->country;
  195.     }
  196.  
  197.     /**
  198.      * Set reducPrice.
  199.      *
  200.      * @param bool $reducPrice
  201.      *
  202.      * @return Ticket
  203.      */
  204.     public function setReducPrice($reducPrice)
  205.     {
  206.         $this->reducPrice = $reducPrice;
  207.  
  208.         return $this;
  209.     }
  210.  
  211.     /**
  212.      * Get reducPrice.
  213.      *
  214.      * @return bool
  215.      */
  216.     public function getReducPrice()
  217.     {
  218.         return $this->reducPrice;
  219.     }
  220.  
  221.     /**
  222.      * Set birthdayDate.
  223.      *
  224.      * @param \DateTime $birthdayDate
  225.      *
  226.      * @return Ticket
  227.      */
  228.     public function setBirthdayDate($birthdayDate)
  229.     {
  230.         $this->birthdayDate = $birthdayDate;
  231.  
  232.         return $this;
  233.     }
  234.  
  235.     /**
  236.      * Get birthdayDate.
  237.      *
  238.      * @return \DateTime
  239.      */
  240.     public function getBirthdayDate()
  241.     {
  242.         return $this->birthdayDate;
  243.     }
  244.  
  245.     /**
  246.      * Set booking.
  247.      *
  248.      * @param \OC\BookingBundle\Entity\Booking|null $booking
  249.      *
  250.      * @return Ticket
  251.      */
  252.     public function setBooking(\OC\BookingBundle\Entity\Booking $booking = null)
  253.     {
  254.         $this->booking = $booking;
  255.  
  256.         return $this;
  257.     }
  258.  
  259.     /**
  260.      * Get booking.
  261.      *
  262.      * @return \OC\BookingBundle\Entity\Booking|null
  263.      */
  264.     public function getBooking()
  265.     {
  266.         return $this->booking;
  267.     }
  268.  
  269.     /**
  270.      * Set price.
  271.      *
  272.      * @param int $price
  273.      *
  274.      * @return Ticket
  275.      */
  276.     public function setPrice($price)
  277.     {
  278.         $this->price = $price;
  279.  
  280.         return $this;
  281.     }
  282.  
  283.     /**
  284.      * Get price.
  285.      *
  286.      * @return int
  287.      */
  288.     public function getPrice()
  289.     {
  290.         return $this->price;
  291.     }
  292. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement