src/MDS/VenuesBundle/Entity/ReservationDeposit.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\MDS\VenuesBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * ReservationDeposit
  6.  *
  7.  * @ORM\Table(name="reservation_deposit")
  8.  * @ORM\Entity(repositoryClass="App\MDS\VenuesBundle\Repository\ReservationDepositRepository")
  9.  * @ORM\HasLifecycleCallbacks()
  10.  */
  11. class ReservationDeposit
  12. {
  13.     /**
  14.      * @var int
  15.      *
  16.      * @ORM\Column(name="id", type="integer")
  17.      * @ORM\Id
  18.      * @ORM\GeneratedValue(strategy="AUTO")
  19.      */
  20.     private $id;
  21.     /**
  22.      * @var int
  23.      *
  24.      * @ORM\Column(name="reservationId", type="integer")
  25.      */
  26.     private $reservationId;
  27.     /**
  28.      * @var bool
  29.      *
  30.      * @ORM\Column(name="isDone", type="boolean", nullable=true)
  31.      */
  32.     private $isDone;
  33.     /**
  34.      * @var string
  35.      *
  36.      * @ORM\Column(name="description", type="string", length=255, nullable=true)
  37.      */
  38.     private $description;
  39.     /**
  40.      * @var string
  41.      *
  42.      * @ORM\Column(name="amount", type="decimal", precision=10, scale=2, nullable=true)
  43.      */
  44.     private $amount;
  45.     /**
  46.      * @var \DateTime
  47.      *
  48.      * @ORM\Column(name="date", type="datetime", nullable=true)
  49.      */
  50.     private $date;
  51.     /**
  52.      * @var int
  53.      *
  54.      * @ORM\Column(name="created_id", type="integer")
  55.      */
  56.     private $createdId;
  57.     /**
  58.      * @var \DateTime
  59.      *
  60.      * @ORM\Column(name="created_at", type="datetime")
  61.      */
  62.     private $createdAt;
  63.     /**
  64.      * @var int
  65.      *
  66.      * @ORM\Column(name="updated_id", type="integer")
  67.      */
  68.     private $updatedId;
  69.     /**
  70.      * @var \DateTime
  71.      *
  72.      * @ORM\Column(name="updated_at", type="datetime")
  73.      */
  74.     private $updatedAt;
  75.     /**
  76.      * @ORM\ManyToOne(
  77.      *   targetEntity="App\MDS\VenuesBundle\Entity\ReservationProformaDeposit",
  78.      *   inversedBy="deposits"
  79.      * )
  80.      * @ORM\JoinColumn(name="proforma_deposit_id", referencedColumnName="id", nullable=true, onDelete="CASCADE")
  81.      */
  82.     private $proformaDeposit;
  83.     /**
  84.      * Get id
  85.      *
  86.      * @return int
  87.      */
  88.     public function getId()
  89.     {
  90.         return $this->id;
  91.     }
  92.     /**
  93.      * Set reservationId
  94.      *
  95.      * @param integer $reservationId
  96.      *
  97.      * @return ReservationDeposit
  98.      */
  99.     public function setReservationId($reservationId)
  100.     {
  101.         $this->reservationId $reservationId;
  102.         return $this;
  103.     }
  104.     /**
  105.      * Get reservationId
  106.      *
  107.      * @return integer
  108.      */
  109.     public function getReservationId()
  110.     {
  111.         return $this->reservationId;
  112.     }
  113.     /**
  114.      * Set isDone
  115.      *
  116.      * @param boolean $isDone
  117.      *
  118.      * @return ReservationDeposit
  119.      */
  120.     public function setIsDone($isDone)
  121.     {
  122.         $this->isDone $isDone;
  123.         return $this;
  124.     }
  125.     /**
  126.      * Get isDone
  127.      *
  128.      * @return boolean
  129.      */
  130.     public function getIsDone()
  131.     {
  132.         return $this->isDone;
  133.     }
  134.     /**
  135.      * Set description
  136.      *
  137.      * @param string $description
  138.      *
  139.      * @return ReservationDeposit
  140.      */
  141.     public function setDescription($description)
  142.     {
  143.         $this->description $description;
  144.         return $this;
  145.     }
  146.     /**
  147.      * Get description
  148.      *
  149.      * @return string
  150.      */
  151.     public function getDescription()
  152.     {
  153.         return $this->description;
  154.     }
  155.     /**
  156.      * Set amount
  157.      *
  158.      * @param string $amount
  159.      *
  160.      * @return ReservationDeposit
  161.      */
  162.     public function setAmount($amount)
  163.     {
  164.         $this->amount $amount;
  165.         return $this;
  166.     }
  167.     /**
  168.      * Get amount
  169.      *
  170.      * @return string
  171.      */
  172.     public function getAmount()
  173.     {
  174.         return $this->amount;
  175.     }
  176.     /**
  177.      * Set date
  178.      *
  179.      * @param \DateTime $date
  180.      *
  181.      * @return ReservationDeposit
  182.      */
  183.     public function setDate($date)
  184.     {
  185.         $this->date $date;
  186.         return $this;
  187.     }
  188.     /**
  189.      * Get date
  190.      *
  191.      * @return \DateTime
  192.      */
  193.     public function getDate()
  194.     {
  195.         return $this->date;
  196.     }
  197.     /**
  198.      * Set createdId
  199.      *
  200.      * @param integer $createdId
  201.      *
  202.      * @return ReservationDeposit
  203.      */
  204.     public function setCreatedId($createdId)
  205.     {
  206.         $this->createdId $createdId;
  207.         return $this;
  208.     }
  209.     /**
  210.      * Get createdId
  211.      *
  212.      * @return integer
  213.      */
  214.     public function getCreatedId()
  215.     {
  216.         return $this->createdId;
  217.     }
  218.     /**
  219.      * Set createdAt
  220.      *
  221.      * @param \DateTime $createdAt
  222.      *
  223.      * @return ReservationDeposit
  224.      */
  225.     public function setCreatedAt($createdAt)
  226.     {
  227.         $this->createdAt $createdAt;
  228.         return $this;
  229.     }
  230.     /**
  231.      * Get createdAt
  232.      *
  233.      * @return \DateTime
  234.      */
  235.     public function getCreatedAt()
  236.     {
  237.         return $this->createdAt;
  238.     }
  239.     /**
  240.      * Set updatedId
  241.      *
  242.      * @param integer $updatedId
  243.      *
  244.      * @return ReservationDeposit
  245.      */
  246.     public function setUpdatedId($updatedId)
  247.     {
  248.         $this->updatedId $updatedId;
  249.         return $this;
  250.     }
  251.     /**
  252.      * Get updatedId
  253.      *
  254.      * @return integer
  255.      */
  256.     public function getUpdatedId()
  257.     {
  258.         return $this->updatedId;
  259.     }
  260.     /**
  261.      * Set updatedAt
  262.      *
  263.      * @param \DateTime $updatedAt
  264.      *
  265.      * @return ReservationDeposit
  266.      */
  267.     public function setUpdatedAt($updatedAt)
  268.     {
  269.         $this->updatedAt $updatedAt;
  270.         return $this;
  271.     }
  272.     /**
  273.      * Get updatedAt
  274.      *
  275.      * @return \DateTime
  276.      */
  277.     public function getUpdatedAt()
  278.     {
  279.         return $this->updatedAt;
  280.     }
  281.     public function getProformaDeposit(): ?ReservationProformaDeposit
  282.     {
  283.         return $this->proformaDeposit;
  284.     }
  285.     public function setProformaDeposit(?ReservationProformaDeposit $proforma): self
  286.     {
  287.         $this->proformaDeposit $proforma;
  288.         return $this;
  289.     }
  290.     /**
  291.      * @ORM\PrePersist
  292.      */
  293.     public function prePersist()
  294.     {
  295.         $this->createdAt = new \DateTime();
  296.         $this->updatedAt = new \DateTime();
  297.     }
  298.     /**
  299.      * @ORM\PreUpdate
  300.      */
  301.     public function preUpdate()
  302.     {
  303.         $this->updatedAt = new \DateTime();
  304.     }
  305. }