<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Table(name: 'crop_synonym')]
#[ORM\Entity(repositoryClass: 'App\Entity\Repository\CropSynonymRepository')]
class CropSynonym
{
#[ORM\Id]
#[ORM\Column(type: 'integer')]
#[ORM\GeneratedValue(strategy: 'AUTO')]
private $id;
#[ORM\Column(type: 'string', nullable: false)]
private $synonym;
#[ORM\Column(type: 'datetime', nullable: true)]
private $date_created;
#[ORM\ManyToOne(targetEntity: 'App\Entity\Crop', inversedBy: 'cropSynonym')]
#[ORM\JoinColumn(name: 'crop_id', referencedColumnName: 'id', nullable: false)]
private $crop;
#[ORM\Column(length: 3, nullable: true)]
private ?string $language = null;
public function getId(): ?int
{
return $this->id;
}
public function getSynonym(): ?string
{
return $this->synonym;
}
public function setSynonym(string $synonym): self
{
$this->synonym = $synonym;
return $this;
}
public function getDateCreated(): ?\DateTimeInterface
{
return $this->date_created;
}
public function setDateCreated(?\DateTimeInterface $date_created): self
{
$this->date_created = $date_created;
return $this;
}
public function getCrop(): ?Crop
{
return $this->crop;
}
public function setCrop(?Crop $crop): self
{
$this->crop = $crop;
return $this;
}
public function getLanguage(): ?string
{
return $this->language;
}
public function setLanguage(?string $language): static
{
$this->language = $language;
return $this;
}
}