<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Serializer\Annotation\Groups;
/**
* @ORM\Entity(repositoryClass="App\Repository\GlossariesRepository")
*/
class Glossaries
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
* @Groups({"main"})
*/
private $id;
/**
* @ORM\Column(type="string", length=255, unique=true)
*/
private $url;
/**
* @ORM\Column(type="text")
*/
private $image;
/**
* @ORM\Column(type="string", length=255)
* @Groups({"main"})
*/
private $title_nl;
/**
* @ORM\Column(type="string", length=255)
* @Groups({"main"})
*/
private $title_en;
/**
* @ORM\Column(type="string", length=255)
*/
private $description_nl;
/**
* @ORM\Column(type="string", length=255)
*/
private $description_en;
/**
* @ORM\Column(type="text")
*/
private $intro_nl;
/**
* @ORM\Column(type="text")
*/
private $intro_en;
/**
* @ORM\Column(type="text")
*/
private $text_nl;
/**
* @ORM\Column(type="text")
*/
private $text_en;
/**
* @ORM\Column(type="datetime")
*/
private $added;
/**
* @ORM\Column(type="integer")
*/
private $user_id;
/**
* @ORM\Column(type="string", length=180, nullable=true)
*/
private $username;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $edited;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $edited_user_id;
/**
* @ORM\Column(type="string", length=180, nullable=true)
*/
private $edited_username;
/**
* @ORM\Column(type="boolean")
*/
private $approved;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $approved_user_id;
/**
* @ORM\Column(type="string", length=180, nullable=true)
*/
private $approved_username;
/**
* @ORM\OneToMany(targetEntity="App\Entity\GlossaryReviews", mappedBy="glossary", orphanRemoval=true)
*/
private $glossaryreviews;
/**
* @ORM\Column(type="integer")
*/
private $num_reviews;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $keywords_nl;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $keywords_en;
public function __construct()
{
$this->reviews = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getUrl(): ?string
{
return $this->url;
}
public function setUrl(string $url): self
{
$this->url = $url;
return $this;
}
public function getImage(): ?string
{
return $this->image;
}
public function setImage(string $image): self
{
$this->image = $image;
return $this;
}
public function getTitleNl(): ?string
{
return $this->title_nl;
}
public function setTitleNl(string $title_nl): self
{
$this->title_nl = $title_nl;
return $this;
}
public function getTitleEn(): ?string
{
return $this->title_en;
}
public function setTitleEn(string $title_en): self
{
$this->title_en = $title_en;
return $this;
}
public function getDescriptionNl(): ?string
{
return $this->description_nl;
}
public function setDescriptionNl(string $description_nl): self
{
$this->description_nl = $description_nl;
return $this;
}
public function getDescriptionEn(): ?string
{
return $this->description_en;
}
public function setDescriptionEn(string $description_en): self
{
$this->description_en = $description_en;
return $this;
}
public function getIntroNl(): ?string
{
return $this->intro_nl;
}
public function setIntroNl(string $intro_nl): self
{
$this->intro_nl = $intro_nl;
return $this;
}
public function getIntroEn(): ?string
{
return $this->intro_en;
}
public function setIntroEn(string $intro_en): self
{
$this->intro_en = $intro_en;
return $this;
}
public function getAdded(): ?\DateTimeInterface
{
return $this->added;
}
public function setAdded(\DateTimeInterface $added): self
{
$this->added = $added;
return $this;
}
public function getUserId(): ?int
{
return $this->user_id;
}
public function setUserId(int $user_id): self
{
$this->user_id = $user_id;
return $this;
}
public function getUsername(): ?string
{
return $this->username;
}
public function setUsername(?string $username): self
{
$this->username = $username;
return $this;
}
public function getApproved(): ?bool
{
return $this->approved;
}
public function setApproved(bool $approved): self
{
$this->approved = $approved;
return $this;
}
public function getApprovedUserId(): ?int
{
return $this->approved_user_id;
}
public function setApprovedUserId(?int $approved_user_id): self
{
$this->approved_user_id = $approved_user_id;
return $this;
}
public function getApprovedUsername(): ?string
{
return $this->approved_username;
}
public function setApprovedUsername(string $approved_username): self
{
$this->approved_username = $approved_username;
return $this;
}
public function getEdited(): ?\DateTimeInterface
{
return $this->edited;
}
public function setEdited(?\DateTimeInterface $edited): self
{
$this->edited = $edited;
return $this;
}
public function getEditedUserId(): ?int
{
return $this->edited_user_id;
}
public function setEditedUserId(?int $edited_user_id): self
{
$this->edited_user_id = $edited_user_id;
return $this;
}
public function getEditedUsername(): ?string
{
return $this->edited_username;
}
public function setEditedUsername(?string $edited_username): self
{
$this->edited_username = $edited_username;
return $this;
}
public function getTextNl(): ?string
{
return $this->text_nl;
}
public function setTextNl(string $text_nl): self
{
$this->text_nl = $text_nl;
return $this;
}
public function getTextEn(): ?string
{
return $this->text_en;
}
public function setTextEn(string $text_en): self
{
$this->text_en = $text_en;
return $this;
}
public function getKeywordsNl(): ?string
{
return $this->keywords_nl;
}
public function setKeywordsNl(?string $keywords_nl): self
{
$this->keywords_nl = $keywords_nl;
return $this;
}
public function getKeywordsEn(): ?string
{
return $this->keywords_en;
}
public function setKeywordsEn(?string $keywords_en): self
{
$this->keywords_en = $keywords_en;
return $this;
}
/**
* @return Collection|GlossaryReviews[]
*/
public function getGlossaryReviews(): Collection
{
return $this->glossaryreviews;
}
public function addGlossaryReview(GlossaryReviews $glossaryreview): self
{
if (!$this->glossaryreviews->contains($glossaryreview)) {
$this->glossaryreviews[] = $glossaryreview;
$glossaryreview->setGlossary($this);
}
return $this;
}
public function removeGlossaryReview(GlossaryReviews $glossaryreview): self
{
if ($this->glossaryreviews->contains($glossaryreview)) {
$this->glossaryreviews->removeElement($glossaryreview);
// set the owning side to null (unless already changed)
if ($glossaryreview->getGlossary() === $this) {
$glossaryreview->setGlossary(null);
}
}
return $this;
}
public function getNumReviews(): ?int
{
return $this->num_reviews;
}
public function setNumReviews(int $num_reviews): self
{
$this->num_reviews = $num_reviews;
return $this;
}
}