<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Advert
*
* The query is on dep_stop_id, arr_stop_id and dep_datetime thus and index on thoses 3 columns can be added. Or we can also add an attribute archived
*
* @ORM\Table
* @ORM\Entity(repositoryClass="App\Repository\AdvertRepository")
*/
class Advert {
/**
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private int $id;
/**
* @ORM\Column(name="dep_datetime", type="datetime")
*/
private \DateTime $depDatetime;
/**
* @ORM\Column(name="arr_datetime", type="datetime")
*/
private $arrDatetime;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Stop")
* @ORM\JoinColumn(name="dep_stop_id", nullable=false)
*/
private Stop $depStop;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Stop")
* @ORM\JoinColumn(name="arr_stop_id", nullable=false)
*/
private Stop $arrStop;
/**
* @ORM\Column(name="seat", type="smallint")
*/
private int $seat;
/**
* @ORM\Column(name="buy", type="decimal", precision=7, scale=2)
*/
private int $buy;
/**
* @ORM\Column(name="resale", type="decimal", precision=7, scale=2)
*/
private int $resale;
/**
* @ORM\Column(name="contact", type="string", length=255)
*/
private string $contact;
/**
* @ORM\Column(name="comment", type="string", length=255, nullable=true)
*/
private ?string $comment;
/**
* @ORM\Column(name="created_at", type="datetime")
*/
private \DateTime $createdAt;
public $accepted;
public function getId(): ?int {
return $this->id;
}
public function getDepDatetime(): ?\DateTimeInterface {
return $this->depDatetime;
}
public function setDepDatetime(\DateTimeInterface $depDatetime): self {
$this->depDatetime = $depDatetime;
return $this;
}
public function getArrDatetime(): ?\DateTimeInterface {
return $this->arrDatetime;
}
public function setArrDatetime(\DateTimeInterface $arrDatetime): self {
$this->arrDatetime = $arrDatetime;
return $this;
}
public function getSeat(): ?int {
return $this->seat;
}
public function setSeat(int $seat): self {
$this->seat = $seat;
return $this;
}
public function getBuy(): ?string {
return $this->buy;
}
public function setBuy(string $buy): self {
$this->buy = $buy;
return $this;
}
public function getResale(): ?string {
return $this->resale;
}
public function setResale(string $resale): self {
$this->resale = $resale;
return $this;
}
public function getContact(): ?string {
return $this->contact;
}
public function setContact(string $contact): self {
$this->contact = $contact;
return $this;
}
public function getComment(): ?string {
return $this->comment;
}
public function setComment(?string $comment): self {
$this->comment = $comment;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface {
return $this->createdAt;
}
public function setCreatedAt(\DateTimeInterface $createdAt): self {
$this->createdAt = $createdAt;
return $this;
}
public function getDepStop(): ?Stop {
return $this->depStop;
}
public function setDepStop(?Stop $depStop): self {
$this->depStop = $depStop;
return $this;
}
public function getArrStop(): ?Stop {
return $this->arrStop;
}
public function setArrStop(?Stop $arrStop): self {
$this->arrStop = $arrStop;
return $this;
}
}