<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
/**
* @ORM\Entity(repositoryClass="App\Repository\FossildbFossilRepository")
*/
class FossildbFossil
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
// /**
// * @ORM\ManyToOne(targetEntity="App\Entity\LocationsFossil")
// */
// private $location_fossil;
/**
* @ORM\ManyToOne(targetEntity=LocationsFossil::class, inversedBy="fossils")
* @ORM\JoinColumn(nullable=false)
*/
private $location_fossil;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Taxanomy")
*/
private $taxanomy;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"main"})
*/
private $genus;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"main"})
*/
private $species;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $publication;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Literature")
*/
private $literature;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\StratigraphyUnits")
*/
private $era;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\StratigraphyUnits")
*/
private $epoch;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\StratigraphyUnits")
*/
private $stage;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\StratigraphyUnits")
*/
private $formation;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\StratigraphyUnits")
*/
private $member;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $date_day;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $date_month;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $date_year;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $comment_nl;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $comment_en;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $user_number;
/**
* @ORM\Column(type="datetime")
*/
private $added;
/**
* @ORM\Column(type="integer", nullable=true)
*/
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\FossildbPhotos", mappedBy="FossildbFossil")
*/
private $fossilDBPhotos;
/**
* @ORM\Column(type="array", nullable=true)
*/
private $taxanomy_tree = [];
/**
* @ORM\OneToMany(targetEntity=FossildbReviews::class, mappedBy="fossilDB_fossil", orphanRemoval=true)
*/
private $fossilDBReviews;
/**
* @ORM\Column(type="integer", options={"default" : 0})
*/
private $num_reviews;
/**
* @ORM\Column(type="integer", options={"default" : 0})
*/
private $num_new_photos;
/**
* @ORM\Column(type="boolean")
*/
private $has_edits;
public function __construct()
{
$this->fossilDBPhotos = new ArrayCollection();
$this->fossilDBReviews = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
// public function getLocationFossil(): ?LocationsFossil
// {
// return $this->location_fossil;
// }
// public function setLocationFossil(?LocationsFossil $location_fossil): self
// {
// $this->location_fossil = $location_fossil;
// return $this;
// }
public function getLocationFossil(): ?LocationsFossil
{
return $this->location_fossil;
}
public function setLocationFossil(?LocationsFossil $location_fossil): self
{
$this->location_fossil = $location_fossil;
return $this;
}
public function getTaxanomy(): ?Taxanomy
{
return $this->taxanomy;
}
public function setTaxanomy(?Taxanomy $taxanomy): self
{
$this->taxanomy = $taxanomy;
return $this;
}
public function getGenus(): ?string
{
return $this->genus;
}
public function setGenus(?string $genus): self
{
$this->genus = $genus;
return $this;
}
public function getSpecies(): ?string
{
return $this->species;
}
public function setSpecies(?string $species): self
{
$this->species = $species;
return $this;
}
public function getPublication(): ?string
{
return $this->publication;
}
public function setPublication(?string $publication): self
{
$this->publication = $publication;
return $this;
}
public function getLiterature(): ?Literature
{
return $this->literature;
}
public function setLiterature(?Literature $literature): self
{
$this->literature = $literature;
return $this;
}
public function getEra(): ?StratigraphyUnits
{
return $this->era;
}
public function setEra(?StratigraphyUnits $era): self
{
$this->era = $era;
return $this;
}
public function getStage(): ?StratigraphyUnits
{
return $this->stage;
}
public function setStage(?StratigraphyUnits $stage): self
{
$this->stage = $stage;
return $this;
}
public function getEpoch(): ?StratigraphyUnits
{
return $this->epoch;
}
public function setEpoch(?StratigraphyUnits $epoch): self
{
$this->epoch = $epoch;
return $this;
}
public function getFormation(): ?StratigraphyUnits
{
return $this->formation;
}
public function setFormation(?StratigraphyUnits $formation): self
{
$this->formation = $formation;
return $this;
}
public function getMember(): ?StratigraphyUnits
{
return $this->member;
}
public function setMember(?StratigraphyUnits $member): self
{
$this->member = $member;
return $this;
}
public function getDateDay(): ?int
{
return $this->date_day;
}
public function setDateDay(?int $date_day): self
{
$this->date_day = $date_day;
return $this;
}
public function getDateMonth(): ?int
{
return $this->date_month;
}
public function setDateMonth(?int $date_month): self
{
$this->date_month = $date_month;
return $this;
}
public function getDateYear(): ?int
{
return $this->date_year;
}
public function setDateYear(?int $date_year): self
{
$this->date_year = $date_year;
return $this;
}
public function getCommentNl(): ?string
{
return $this->comment_nl;
}
public function setCommentNl(?string $comment_nl): self
{
$this->comment_nl = $comment_nl;
return $this;
}
public function getCommentEn(): ?string
{
return $this->comment_en;
}
public function setCommentEn(?string $comment_en): self
{
$this->comment_en = $comment_en;
return $this;
}
public function getUserNumber(): ?string
{
return $this->user_number;
}
public function setUserNumber(?string $user_number): self
{
$this->user_number = $user_number;
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 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 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;
}
/**
* @return Collection|FossildbPhotos[]
*/
public function getFossildbPhotos(): Collection
{
return $this->fossilDBPhotos;
}
public function addFossildbPhoto(FossildbPhotos $fossilDBPhoto): self
{
if (!$this->fossilDBPhotos->contains($fossilDBPhoto)) {
$this->fossilDBPhotos[] = $fossilDBPhoto;
$fossilDBPhoto->setFossildbFossil($this);
}
return $this;
}
public function removeFossildbPhoto(FossildbPhotos $fossilDBPhoto): self
{
if ($this->fossilDBPhotos->contains($fossilDBPhoto)) {
$this->fossilDBPhotos->removeElement($fossilDBPhoto);
// set the owning side to null (unless already changed)
if ($fossilDBPhoto->getFossildbFossil() === $this) {
$fossilDBPhoto->setFossildbFossil(null);
}
}
return $this;
}
public function getTaxanomyTree(): ?array
{
return $this->taxanomy_tree;
}
public function setTaxanomyTree(?array $taxanomy_tree): self
{
$this->taxanomy_tree = $taxanomy_tree;
return $this;
}
/**
* @return Collection|FossildbReview[]
*/
public function getFossildbReviews(): Collection
{
return $this->fossilDBReviews;
}
public function addFossildbReview(FossildbReviews $fossilDBReviews): self
{
if (!$this->fossilDBReviews->contains($fossilDBReviews)) {
$this->fossilDBReviews[] = $fossilDBReviews;
$fossilDBReviews->setFossildbFossil($this);
}
return $this;
}
public function removeFossildbReview(FossildbReviews $fossilDBReviews): self
{
if ($this->fossilDBReviews->contains($fossilDBReviews)) {
$this->fossilDBReviews->removeElement($fossilDBReviews);
// set the owning side to null (unless already changed)
if ($fossilDBReviews->getFossildbFossil() === $this) {
$fossilDBReviews->setFossildbFossil(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;
}
public function getNumNewPhotos(): ?int
{
return $this->num_new_photos;
}
public function setNumNewPhotos(int $num_new_photos): self
{
$this->num_new_photos = $num_new_photos;
return $this;
}
public function getHasEdits(): ?bool
{
return $this->has_edits;
}
public function setHasEdits(bool $has_edits): self
{
$this->has_edits = $has_edits;
return $this;
}
}