src/Entity/OrderParticipantBike.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\OrderParticipantBikeRepository;
  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=OrderParticipantBikeRepository::class)
  10.  */
  11. class OrderParticipantBike
  12. {
  13.     /**
  14.      * @ORM\Id
  15.      * @ORM\GeneratedValue
  16.      * @ORM\Column(type="integer")
  17.      */
  18.     private $id;
  19.     /**
  20.      * @ORM\ManyToOne(targetEntity=Order::class, inversedBy="orderParticipantBikes")
  21.      */
  22.     private $book;
  23.     /**
  24.      * @ORM\ManyToOne(targetEntity=Participant::class, inversedBy="orderParticipantBikes")
  25.      */
  26.     private $participant;
  27.     /**
  28.      * @ORM\ManyToOne(targetEntity=Bike::class, inversedBy="orderParticipantBikes")
  29.      */
  30.     private $bike;
  31.     /**
  32.      * @ORM\Column(type="float", nullable=true)
  33.      */
  34.     private $bike_price;
  35.     /**
  36.      * @ORM\Column(type="datetime_immutable")
  37.      *  @Gedmo\Timestampable(on="create")
  38.      */
  39.     private $created_at;
  40.     /**
  41.      * @ORM\Column(type="datetime_immutable")
  42.      *  @Gedmo\Timestampable(on="update")
  43.      */
  44.     private $updated_at;
  45.     public function __construct()
  46.     {
  47.     }
  48.     public function getId(): ?int
  49.     {
  50.         return $this->id;
  51.     }
  52.     public function getBook(): ?Order
  53.     {
  54.         return $this->book;
  55.     }
  56.     public function setBook(?Order $book): self
  57.     {
  58.         $this->book $book;
  59.         return $this;
  60.     }
  61.     public function getParticipant(): ?Participant
  62.     {
  63.         return $this->participant;
  64.     }
  65.     public function setParticipant(?Participant $participant): self
  66.     {
  67.         $this->participant $participant;
  68.         return $this;
  69.     }
  70.     public function getBike(): ?Bike
  71.     {
  72.         return $this->bike;
  73.     }
  74.     public function setBike(?Bike $bike): self
  75.     {
  76.         $this->bike $bike;
  77.         return $this;
  78.     }
  79.     
  80.     public function getBikePrice(): ?float
  81.     {
  82.         return $this->bike_price;
  83.     }
  84.     public function setBikePrice(float $bike_price): self
  85.     {
  86.         $this->bike_price $bike_price;
  87.         return $this;
  88.     }
  89.     
  90.     public function getCreatedAt(): ?\DateTimeImmutable
  91.     {
  92.         return $this->created_at;
  93.     }
  94.     public function setCreatedAt(\DateTimeImmutable $created_at): self
  95.     {
  96.         $this->created_at $created_at;
  97.         return $this;
  98.     }
  99.     public function getUpdatedAt(): ?\DateTimeImmutable
  100.     {
  101.         return $this->updated_at;
  102.     }
  103.     public function setUpdatedAt(\DateTimeImmutable $updated_at): self
  104.     {
  105.         $this->updated_at $updated_at;
  106.         return $this;
  107.     }
  108. }