<?phpnamespace App\Entity\Gos;use Doctrine\ORM\Mapping as ORM;/** * ShortUel * * @ORM\Table(name="short_url") * @ORM\Entity(repositoryClass="App\Repository\ShortUrlRepository") * @ORM\HasLifecycleCallbacks */class ShortUrl{ const SHORT_DOMAIN = 'https://fmp.pl/'; /** * @ORM\Id() * @ORM\GeneratedValue() * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="datetime") */ private $createdAt; /** * @ORM\Column(type="text") */ private $full; /** * @ORM\Column(type="string", length=190, unique=true) */ private $short; /** * @ORM\Column(type="integer", options={"default" : 0}) */ private $redirects; /** * @ORM\Column(type="text", nullable=true) */ private $comment; /** * Get id * * @return integer */ public function getId() { return $this->id; } /** @ORM\PrePersist() */ public function prePersist() { $this->createdAt = new \DateTime(); } /** * Set createdAt * * @param \DateTime $createdAt * * @return ShortUrl */ public function setCreatedAt($createdAt) { $this->createdAt = $createdAt; return $this; } /** * Get createdAt * * @return \DateTime */ public function getCreatedAt() { return $this->createdAt; } /** * Set full * * @param String $fullUrl * * @return ShortUrl */ public function setFull($fullUrl) { $this->full = $fullUrl; return $this; } /** * Get full * * @return String */ public function getFull() { return $this->full; } /** * Set shortUrl * * @param String $shortUrl * * @return ShortUrl */ public function setShort($shortUrl) { $this->short = $shortUrl; return $this; } /** * Get short * * @return String */ public function getShort() { return $this->short; } /** * Set redirects * * @param Int $currentCount * * @return ShortUrl */ public function setRedirects($currentCount) { $this->redirects = $currentCount; return $this; } /** * Get redirects * * @return String */ public function getRedirects() { return $this->redirects; } public function getComment(): ?string { return $this->comment; } public function setComment(?string $comment): self { $this->comment = $comment; return $this; }}