src/Entity/Main/History.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Main;
  3. use App\Repository\HistoryRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=HistoryRepository::class)
  7.  */
  8. class History
  9. {
  10.     /**
  11.      * @ORM\Id
  12.      * @ORM\GeneratedValue
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @var Reservation
  18.      * @ORM\ManyToOne(targetEntity="App\Entity\Main\Reservation", inversedBy="historyResa")
  19.      */
  20.     private $reservation;   
  21.     
  22.     /**
  23.      * @ORM\Column(type="integer", nullable=false)
  24.      */
  25.     private $customer_id;
  26.     /**
  27.      * @var Customer
  28.      */
  29.     private $customer;
  30.     /**
  31.      * @ORM\Column(type="datetime")
  32.      */
  33.     private $date;
  34.     /**
  35.      * @ORM\Column(type="string", length=255, nullable=true)
  36.      */
  37.     private $information;
  38.     /**
  39.      * @ORM\Column(type="float")
  40.      */
  41.     private $mouvement;
  42.     
  43.     /**
  44.      * Constructor
  45.      */
  46.     public function __construct()
  47.     {
  48.         $dateTimeZone = new \DateTimeZone('Europe/Paris'); 
  49.         $this->date = new \DateTime('now'$dateTimeZone);
  50.     }
  51.     public function __toString()
  52.     {
  53.         return (string) $this->information;
  54.     }
  55.     public function getId(): ?int
  56.     {
  57.         return $this->id;
  58.     }
  59.     public function getReservation()
  60.     {
  61.         return $this->reservation;
  62.     }
  63.     public function setReservation(\App\Entity\Main\Reservation $reservation): self
  64.     {
  65.         $this->reservation $reservation;
  66.         return $this;
  67.     }
  68.     public function getCustomerId()
  69.     {
  70.         return $this->customer_id;
  71.     }
  72.     public function setCustomerId(?int $customer_id): self
  73.     {
  74.         $this->customer_id $customer_id;
  75.         return $this;
  76.     }
  77.     
  78.     public function getCustomer(): ?int
  79.     {
  80.         return $this->customer;
  81.     }
  82.     public function setCustomer(\App\Entity\Customer\Customer $customer): self
  83.     {
  84.         $this->customer $customer;
  85.         return $this;
  86.     }
  87.     public function getDate(): ?\DateTimeInterface
  88.     {
  89.         return $this->date;
  90.     }
  91.     public function setDate(\DateTimeInterface $date): self
  92.     {
  93.         $this->date $date;
  94.         return $this;
  95.     }
  96.     public function getInformation(): ?string
  97.     {
  98.         return $this->information;
  99.     }
  100.     public function setInformation(?string $information): self
  101.     {
  102.         $this->information $information;
  103.         return $this;
  104.     }
  105.     public function getMouvement(): ?float
  106.     {
  107.         return $this->mouvement;
  108.     }
  109.     public function setMouvement(float $mouvement): self
  110.     {
  111.         $this->mouvement $mouvement;
  112.         return $this;
  113.     }
  114. }