src/Entity/CropSynonym.php line 7

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. #[ORM\Table(name'crop_synonym')]
  5. #[ORM\Entity(repositoryClass'App\Entity\Repository\CropSynonymRepository')]
  6. class CropSynonym
  7. {
  8.     #[ORM\Id]
  9.     #[ORM\Column(type'integer')]
  10.     #[ORM\GeneratedValue(strategy'AUTO')]
  11.     private $id;
  12.     #[ORM\Column(type'string'nullablefalse)]
  13.     private $synonym;
  14.     #[ORM\Column(type'datetime'nullabletrue)]
  15.     private $date_created;
  16.     #[ORM\ManyToOne(targetEntity'App\Entity\Crop'inversedBy'cropSynonym')]
  17.     #[ORM\JoinColumn(name'crop_id'referencedColumnName'id'nullablefalse)]
  18.     private $crop;
  19.     #[ORM\Column(length3nullabletrue)]
  20.     private ?string $language null;
  21.     public function getId(): ?int
  22.     {
  23.         return $this->id;
  24.     }
  25.     public function getSynonym(): ?string
  26.     {
  27.         return $this->synonym;
  28.     }
  29.     public function setSynonym(string $synonym): self
  30.     {
  31.         $this->synonym $synonym;
  32.         return $this;
  33.     }
  34.     public function getDateCreated(): ?\DateTimeInterface
  35.     {
  36.         return $this->date_created;
  37.     }
  38.     public function setDateCreated(?\DateTimeInterface $date_created): self
  39.     {
  40.         $this->date_created $date_created;
  41.         return $this;
  42.     }
  43.     public function getCrop(): ?Crop
  44.     {
  45.         return $this->crop;
  46.     }
  47.     public function setCrop(?Crop $crop): self
  48.     {
  49.         $this->crop $crop;
  50.         return $this;
  51.     }
  52.     public function getLanguage(): ?string
  53.     {
  54.         return $this->language;
  55.     }
  56.     public function setLanguage(?string $language): static
  57.     {
  58.         $this->language $language;
  59.         return $this;
  60.     }
  61. }