<?php
namespace App\Entity;
use App\Repository\OrderParticipantBikeRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* @ORM\Entity(repositoryClass=OrderParticipantBikeRepository::class)
*/
class OrderParticipantBike
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=Order::class, inversedBy="orderParticipantBikes")
*/
private $book;
/**
* @ORM\ManyToOne(targetEntity=Participant::class, inversedBy="orderParticipantBikes")
*/
private $participant;
/**
* @ORM\ManyToOne(targetEntity=Bike::class, inversedBy="orderParticipantBikes")
*/
private $bike;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $bike_price;
/**
* @ORM\Column(type="datetime_immutable")
* @Gedmo\Timestampable(on="create")
*/
private $created_at;
/**
* @ORM\Column(type="datetime_immutable")
* @Gedmo\Timestampable(on="update")
*/
private $updated_at;
public function __construct()
{
}
public function getId(): ?int
{
return $this->id;
}
public function getBook(): ?Order
{
return $this->book;
}
public function setBook(?Order $book): self
{
$this->book = $book;
return $this;
}
public function getParticipant(): ?Participant
{
return $this->participant;
}
public function setParticipant(?Participant $participant): self
{
$this->participant = $participant;
return $this;
}
public function getBike(): ?Bike
{
return $this->bike;
}
public function setBike(?Bike $bike): self
{
$this->bike = $bike;
return $this;
}
public function getBikePrice(): ?float
{
return $this->bike_price;
}
public function setBikePrice(float $bike_price): self
{
$this->bike_price = $bike_price;
return $this;
}
public function getCreatedAt(): ?\DateTimeImmutable
{
return $this->created_at;
}
public function setCreatedAt(\DateTimeImmutable $created_at): self
{
$this->created_at = $created_at;
return $this;
}
public function getUpdatedAt(): ?\DateTimeImmutable
{
return $this->updated_at;
}
public function setUpdatedAt(\DateTimeImmutable $updated_at): self
{
$this->updated_at = $updated_at;
return $this;
}
}