src/Entity/FossildbFossil.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Component\Serializer\Annotation\Groups;
  7. /**
  8.  * @ORM\Entity(repositoryClass="App\Repository\FossildbFossilRepository")
  9.  */
  10. class FossildbFossil
  11. {
  12.     /**
  13.      * @ORM\Id()
  14.      * @ORM\GeneratedValue()
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     // /**
  19.     //  * @ORM\ManyToOne(targetEntity="App\Entity\LocationsFossil")
  20.     //  */
  21.     // private $location_fossil;
  22.     /**
  23.      * @ORM\ManyToOne(targetEntity=LocationsFossil::class, inversedBy="fossils")
  24.      * @ORM\JoinColumn(nullable=false)
  25.      */
  26.     private $location_fossil;
  27.     /**
  28.      * @ORM\ManyToOne(targetEntity="App\Entity\Taxanomy")
  29.      */
  30.     private $taxanomy;
  31.     /**
  32.      * @ORM\Column(type="string", length=255, nullable=true)
  33.      * @Groups({"main"})
  34.      */
  35.     private $genus;
  36.     /**
  37.      * @ORM\Column(type="string", length=255, nullable=true)
  38.      * @Groups({"main"})
  39.      */
  40.     private $species;
  41.     /**
  42.      * @ORM\Column(type="string", length=255, nullable=true)
  43.      */
  44.     private $publication;
  45.     /**
  46.      * @ORM\ManyToOne(targetEntity="App\Entity\Literature")
  47.      */
  48.     private $literature;
  49.     /**
  50.      * @ORM\ManyToOne(targetEntity="App\Entity\StratigraphyUnits")
  51.      */
  52.     private $era;
  53.     /**
  54.      * @ORM\ManyToOne(targetEntity="App\Entity\StratigraphyUnits")
  55.      */
  56.     private $epoch;
  57.     /**
  58.      * @ORM\ManyToOne(targetEntity="App\Entity\StratigraphyUnits")
  59.      */
  60.     private $stage;
  61.     /**
  62.      * @ORM\ManyToOne(targetEntity="App\Entity\StratigraphyUnits")
  63.      */
  64.     private $formation;
  65.     /**
  66.      * @ORM\ManyToOne(targetEntity="App\Entity\StratigraphyUnits")
  67.      */
  68.     private $member;
  69.     /**
  70.      * @ORM\Column(type="integer", nullable=true)
  71.      */
  72.     private $date_day;
  73.     /**
  74.      * @ORM\Column(type="integer", nullable=true)
  75.      */
  76.     private $date_month;
  77.     /**
  78.      * @ORM\Column(type="integer", nullable=true)
  79.      */
  80.     private $date_year;
  81.     /**
  82.      * @ORM\Column(type="text", nullable=true)
  83.      */
  84.     private $comment_nl;
  85.     /**
  86.      * @ORM\Column(type="text", nullable=true)
  87.      */
  88.     private $comment_en;
  89.     /**
  90.      * @ORM\Column(type="string", length=255, nullable=true)
  91.      */
  92.     private $user_number;
  93.     /**
  94.      * @ORM\Column(type="datetime")
  95.      */
  96.     private $added;
  97.     /**
  98.      * @ORM\Column(type="integer", nullable=true)
  99.      */
  100.     private $user_id;
  101.     /**
  102.      * @ORM\Column(type="string", length=180, nullable=true)
  103.      */
  104.     private $username;
  105.     /**
  106.      * @ORM\Column(type="datetime", nullable=true)
  107.      */
  108.     private $edited;
  109.     /**
  110.      * @ORM\Column(type="integer", nullable=true)
  111.      */
  112.     private $edited_user_id;
  113.     /**
  114.      * @ORM\Column(type="string", length=180, nullable=true)
  115.      */
  116.     private $edited_username;
  117.     /**
  118.      * @ORM\Column(type="boolean")
  119.      */
  120.     private $approved;
  121.     /**
  122.      * @ORM\Column(type="integer", nullable=true)
  123.      */
  124.     private $approved_user_id;
  125.     /**
  126.      * @ORM\Column(type="string", length=180, nullable=true)
  127.      */
  128.     private $approved_username;
  129.     /**
  130.      * @ORM\OneToMany(targetEntity="App\Entity\FossildbPhotos", mappedBy="FossildbFossil")
  131.      */
  132.     private $fossilDBPhotos;
  133.     /**
  134.      * @ORM\Column(type="array", nullable=true)
  135.      */
  136.     private $taxanomy_tree = [];
  137.     /**
  138.      * @ORM\OneToMany(targetEntity=FossildbReviews::class, mappedBy="fossilDB_fossil", orphanRemoval=true)
  139.      */
  140.     private $fossilDBReviews;
  141.     /**
  142.      * @ORM\Column(type="integer", options={"default" : 0})
  143.      */
  144.     private $num_reviews;
  145.     /**
  146.      * @ORM\Column(type="integer", options={"default" : 0})
  147.      */
  148.     private $num_new_photos;
  149.     /**
  150.      * @ORM\Column(type="boolean")
  151.      */
  152.     private $has_edits;
  153.     public function __construct()
  154.     {
  155.         $this->fossilDBPhotos = new ArrayCollection();
  156.         $this->fossilDBReviews = new ArrayCollection();
  157.     }
  158.     public function getId(): ?int
  159.     {
  160.         return $this->id;
  161.     }
  162.     // public function getLocationFossil(): ?LocationsFossil
  163.     // {
  164.     //     return $this->location_fossil;
  165.     // }
  166.     // public function setLocationFossil(?LocationsFossil $location_fossil): self
  167.     // {
  168.     //     $this->location_fossil = $location_fossil;
  169.     //     return $this;
  170.     // }
  171.     public function getLocationFossil(): ?LocationsFossil
  172.     {
  173.         return $this->location_fossil;
  174.     }
  175.     public function setLocationFossil(?LocationsFossil $location_fossil): self
  176.     {
  177.         $this->location_fossil $location_fossil;
  178.         return $this;
  179.     }
  180.     public function getTaxanomy(): ?Taxanomy
  181.     {
  182.         return $this->taxanomy;
  183.     }
  184.     public function setTaxanomy(?Taxanomy $taxanomy): self
  185.     {
  186.         $this->taxanomy $taxanomy;
  187.         return $this;
  188.     }
  189.     public function getGenus(): ?string
  190.     {
  191.         return $this->genus;
  192.     }
  193.     public function setGenus(?string $genus): self
  194.     {
  195.         $this->genus $genus;
  196.         return $this;
  197.     }
  198.     public function getSpecies(): ?string
  199.     {
  200.         return $this->species;
  201.     }
  202.     public function setSpecies(?string $species): self
  203.     {
  204.         $this->species $species;
  205.         return $this;
  206.     }
  207.     public function getPublication(): ?string
  208.     {
  209.         return $this->publication;
  210.     }
  211.     public function setPublication(?string $publication): self
  212.     {
  213.         $this->publication $publication;
  214.         return $this;
  215.     }
  216.     public function getLiterature(): ?Literature
  217.     {
  218.         return $this->literature;
  219.     }
  220.     public function setLiterature(?Literature $literature): self
  221.     {
  222.         $this->literature $literature;
  223.         return $this;
  224.     }
  225.     public function getEra(): ?StratigraphyUnits
  226.     {
  227.         return $this->era;
  228.     }
  229.     public function setEra(?StratigraphyUnits $era): self
  230.     {
  231.         $this->era $era;
  232.         return $this;
  233.     }
  234.     public function getStage(): ?StratigraphyUnits
  235.     {
  236.         return $this->stage;
  237.     }
  238.     public function setStage(?StratigraphyUnits $stage): self
  239.     {
  240.         $this->stage $stage;
  241.         return $this;
  242.     }
  243.     public function getEpoch(): ?StratigraphyUnits
  244.     {
  245.         return $this->epoch;
  246.     }
  247.     public function setEpoch(?StratigraphyUnits $epoch): self
  248.     {
  249.         $this->epoch $epoch;
  250.         return $this;
  251.     }
  252.     public function getFormation(): ?StratigraphyUnits
  253.     {
  254.         return $this->formation;
  255.     }
  256.     public function setFormation(?StratigraphyUnits $formation): self
  257.     {
  258.         $this->formation $formation;
  259.         return $this;
  260.     }
  261.     public function getMember(): ?StratigraphyUnits
  262.     {
  263.         return $this->member;
  264.     }
  265.     public function setMember(?StratigraphyUnits $member): self
  266.     {
  267.         $this->member $member;
  268.         return $this;
  269.     }
  270.     public function getDateDay(): ?int
  271.     {
  272.         return $this->date_day;
  273.     }
  274.     public function setDateDay(?int $date_day): self
  275.     {
  276.         $this->date_day $date_day;
  277.         return $this;
  278.     }
  279.     public function getDateMonth(): ?int
  280.     {
  281.         return $this->date_month;
  282.     }
  283.     public function setDateMonth(?int $date_month): self
  284.     {
  285.         $this->date_month $date_month;
  286.         return $this;
  287.     }
  288.     public function getDateYear(): ?int
  289.     {
  290.         return $this->date_year;
  291.     }
  292.     public function setDateYear(?int $date_year): self
  293.     {
  294.         $this->date_year $date_year;
  295.         return $this;
  296.     }
  297.     public function getCommentNl(): ?string
  298.     {
  299.         return $this->comment_nl;
  300.     }
  301.     public function setCommentNl(?string $comment_nl): self
  302.     {
  303.         $this->comment_nl $comment_nl;
  304.         return $this;
  305.     }
  306.     public function getCommentEn(): ?string
  307.     {
  308.         return $this->comment_en;
  309.     }
  310.     public function setCommentEn(?string $comment_en): self
  311.     {
  312.         $this->comment_en $comment_en;
  313.         return $this;
  314.     }
  315.     public function getUserNumber(): ?string
  316.     {
  317.         return $this->user_number;
  318.     }
  319.     public function setUserNumber(?string $user_number): self
  320.     {
  321.         $this->user_number $user_number;
  322.         return $this;
  323.     }
  324.     public function getAdded(): ?\DateTimeInterface
  325.     {
  326.         return $this->added;
  327.     }
  328.     public function setAdded(\DateTimeInterface $added): self
  329.     {
  330.         $this->added $added;
  331.         return $this;
  332.     }
  333.     public function getUserId(): ?int
  334.     {
  335.         return $this->user_id;
  336.     }
  337.     public function setUserId(?int $user_id): self
  338.     {
  339.         $this->user_id $user_id;
  340.         return $this;
  341.     }
  342.     public function getUsername(): ?string
  343.     {
  344.         return $this->username;
  345.     }
  346.     public function setUsername(string $username): self
  347.     {
  348.         $this->username $username;
  349.         return $this;
  350.     }
  351.     public function getEdited(): ?\DateTimeInterface
  352.     {
  353.         return $this->edited;
  354.     }
  355.     public function setEdited(?\DateTimeInterface $edited): self
  356.     {
  357.         $this->edited $edited;
  358.         return $this;
  359.     }
  360.     public function getEditedUserId(): ?int
  361.     {
  362.         return $this->edited_user_id;
  363.     }
  364.     public function setEditedUserId(?int $edited_user_id): self
  365.     {
  366.         $this->edited_user_id $edited_user_id;
  367.         return $this;
  368.     }
  369.     public function getEditedUsername(): ?string
  370.     {
  371.         return $this->edited_username;
  372.     }
  373.     public function setEditedUsername(?string $edited_username): self
  374.     {
  375.         $this->edited_username $edited_username;
  376.         return $this;
  377.     }
  378.     public function getApproved(): ?bool
  379.     {
  380.         return $this->approved;
  381.     }
  382.     public function setApproved(bool $approved): self
  383.     {
  384.         $this->approved $approved;
  385.         return $this;
  386.     }
  387.     public function getApprovedUserId(): ?int
  388.     {
  389.         return $this->approved_user_id;
  390.     }
  391.     public function setApprovedUserId(?int $approved_user_id): self
  392.     {
  393.         $this->approved_user_id $approved_user_id;
  394.         return $this;
  395.     }
  396.     public function getApprovedUsername(): ?string
  397.     {
  398.         return $this->approved_username;
  399.     }
  400.     public function setApprovedUsername(string $approved_username): self
  401.     {
  402.         $this->approved_username $approved_username;
  403.         return $this;
  404.     }
  405.     /**
  406.      * @return Collection|FossildbPhotos[]
  407.      */
  408.     public function getFossildbPhotos(): Collection
  409.     {
  410.         return $this->fossilDBPhotos;
  411.     }
  412.     public function addFossildbPhoto(FossildbPhotos $fossilDBPhoto): self
  413.     {
  414.         if (!$this->fossilDBPhotos->contains($fossilDBPhoto)) {
  415.             $this->fossilDBPhotos[] = $fossilDBPhoto;
  416.             $fossilDBPhoto->setFossildbFossil($this);
  417.         }
  418.         return $this;
  419.     }
  420.     public function removeFossildbPhoto(FossildbPhotos $fossilDBPhoto): self
  421.     {
  422.         if ($this->fossilDBPhotos->contains($fossilDBPhoto)) {
  423.             $this->fossilDBPhotos->removeElement($fossilDBPhoto);
  424.             // set the owning side to null (unless already changed)
  425.             if ($fossilDBPhoto->getFossildbFossil() === $this) {
  426.                 $fossilDBPhoto->setFossildbFossil(null);
  427.             }
  428.         }
  429.         return $this;
  430.     }
  431.     public function getTaxanomyTree(): ?array
  432.     {
  433.         return $this->taxanomy_tree;
  434.     }
  435.     public function setTaxanomyTree(?array $taxanomy_tree): self
  436.     {
  437.         $this->taxanomy_tree $taxanomy_tree;
  438.         return $this;
  439.     }
  440.     /**
  441.      * @return Collection|FossildbReview[]
  442.      */
  443.     public function getFossildbReviews(): Collection
  444.     {
  445.         return $this->fossilDBReviews;
  446.     }
  447.     public function addFossildbReview(FossildbReviews $fossilDBReviews): self
  448.     {
  449.         if (!$this->fossilDBReviews->contains($fossilDBReviews)) {
  450.             $this->fossilDBReviews[] = $fossilDBReviews;
  451.             $fossilDBReviews->setFossildbFossil($this);
  452.         }
  453.         return $this;
  454.     }
  455.     public function removeFossildbReview(FossildbReviews $fossilDBReviews): self
  456.     {
  457.         if ($this->fossilDBReviews->contains($fossilDBReviews)) {
  458.             $this->fossilDBReviews->removeElement($fossilDBReviews);
  459.             // set the owning side to null (unless already changed)
  460.             if ($fossilDBReviews->getFossildbFossil() === $this) {
  461.                 $fossilDBReviews->setFossildbFossil(null);
  462.             }
  463.         }
  464.         return $this;
  465.     }
  466.     public function getNumReviews(): ?int
  467.     {
  468.         return $this->num_reviews;
  469.     }
  470.     public function setNumReviews(int $num_reviews): self
  471.     {
  472.         $this->num_reviews $num_reviews;
  473.         return $this;
  474.     }
  475.     public function getNumNewPhotos(): ?int
  476.     {
  477.         return $this->num_new_photos;
  478.     }
  479.     public function setNumNewPhotos(int $num_new_photos): self
  480.     {
  481.         $this->num_new_photos $num_new_photos;
  482.         return $this;
  483.     }
  484.     public function getHasEdits(): ?bool
  485.     {
  486.         return $this->has_edits;
  487.     }
  488.     public function setHasEdits(bool $has_edits): self
  489.     {
  490.         $this->has_edits $has_edits;
  491.         return $this;
  492.     }
  493. }