src/Entity/History.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\HistoryRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Gedmo\Mapping\Annotation as Gedmo;
  8. /**
  9.  * @ORM\Entity(repositoryClass=HistoryRepository::class)
  10.  */
  11. class History
  12. {
  13.     /**
  14.      * @ORM\Id
  15.      * @ORM\GeneratedValue
  16.      * @ORM\Column(type="integer")
  17.      */
  18.     private $id;
  19.     /**
  20.      * @ORM\Column(type="string", length=255)
  21.      */
  22.     private $comment;
  23.     /**
  24.      * @ORM\Column(type="string")
  25.      */
  26.     private $statut;
  27.     /**
  28.      * @ORM\ManyToOne(targetEntity=Agency::class, inversedBy="histories")
  29.      */
  30.     private $agency;
  31.     /**
  32.      * @ORM\ManyToOne(targetEntity=Bike::class, inversedBy="histories")
  33.      * @ORM\JoinColumn(name="bike_id", referencedColumnName="id", nullable=true)
  34.      */
  35.     private $bike;
  36.     /**
  37.      * @ORM\ManyToOne(targetEntity=Accessory::class, inversedBy="histories")
  38.      * @ORM\JoinColumn(name="accessory_id", referencedColumnName="id", nullable=true)
  39.      */
  40.     private $accessory;
  41.     
  42.     /**
  43.      * @ORM\ManyToOne(targetEntity=Order::class, inversedBy="histories")
  44.      */
  45.     private $book;
  46.     /**
  47.      * @ORM\Column(type="datetime_immutable")
  48.      * @Gedmo\Timestampable(on="create")
  49.      */
  50.     private $created_at;
  51.     /**
  52.      * @ORM\Column(type="datetime_immutable")
  53.      * @Gedmo\Timestampable(on="update")
  54.      */
  55.     private $updated_at;
  56.     public function __construct()
  57.     {
  58.     }
  59.     public function getId(): ?int
  60.     {
  61.         return $this->id;
  62.     }
  63.     public function getComment(): ?string
  64.     {
  65.         return $this->comment;
  66.     }
  67.     public function setComment(string $comment): self
  68.     {
  69.         $this->comment $comment;
  70.         return $this;
  71.     }
  72.     public function getStatut(): ?string
  73.     {
  74.         return $this->statut;
  75.     }
  76.     public function setStatut(string $statut): self
  77.     {
  78.         $this->statut $statut;
  79.         return $this;
  80.     }
  81.     public function getAgency(): ?Agency
  82.     {
  83.         return $this->agency;
  84.     }
  85.     public function setAgency(?Agency $agency): self
  86.     {
  87.         $this->agency $agency;
  88.         return $this;
  89.     }
  90.     public function getBike(): ?Bike
  91.     {
  92.         return $this->bike;
  93.     }
  94.     public function setBike(?Bike $bike): self
  95.     {
  96.         $this->bike $bike;
  97.         return $this;
  98.     }
  99.     public function getAccessory(): ?Accessory
  100.     {
  101.         return $this->accessory;
  102.     }
  103.     public function setAccessory(?Accessory $accessory): self
  104.     {
  105.         $this->accessory $accessory;
  106.         return $this;
  107.     }
  108.     public function getBook(): ?Order
  109.     {
  110.         return $this->book;
  111.     }
  112.     public function setBook(?Order $book): self
  113.     {
  114.         $this->book $book;
  115.         return $this;
  116.     }
  117.     public function getCreatedAt(): ?\DateTimeImmutable
  118.     {
  119.         return $this->created_at;
  120.     }
  121.     public function setCreatedAt(\DateTimeImmutable $created_at): self
  122.     {
  123.         $this->created_at $created_at;
  124.         return $this;
  125.     }
  126.     public function getUpdatedAt(): ?\DateTimeImmutable
  127.     {
  128.         return $this->updated_at;
  129.     }
  130.     public function setUpdatedAt(\DateTimeImmutable $updated_at): self
  131.     {
  132.         $this->updated_at $updated_at;
  133.         return $this;
  134.     }
  135. }