<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity]
class PlanCrop
{
#[ORM\Id]
#[ORM\Column(type: 'integer')]
#[ORM\GeneratedValue(strategy: 'AUTO')]
private $id;
#[ORM\Column(type: 'boolean', nullable: true)]
private $is_fill_crop;
#[ORM\Column(type: 'integer', nullable: false)]
private $amount;
#[ORM\Column(type: 'datetime', nullable: true)]
private $date_created;
#[ORM\ManyToOne(targetEntity: 'App\Entity\Crop', inversedBy: 'planCrop')]
#[ORM\JoinColumn(name: 'crop_id', referencedColumnName: 'id', nullable: false)]
private $crop;
#[ORM\ManyToOne(targetEntity: 'App\Entity\Plan', inversedBy: 'planCrop')]
#[ORM\JoinColumn(name: 'plan_id', referencedColumnName: 'id', nullable: false)]
private $plan;
public function getId(): ?int
{
return $this->id;
}
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 getPlan(): ?Plan
{
return $this->plan;
}
public function setPlan(?Plan $plan): self
{
$this->plan = $plan;
return $this;
}
public function getAmount(): ?int
{
return $this->amount;
}
public function setAmount(int $amount): self
{
$this->amount = $amount;
return $this;
}
public function getIsFillCrop(): ?bool
{
return $this->is_fill_crop;
}
public function setIsFillCrop(?bool $is_fill_crop): self
{
$this->is_fill_crop = $is_fill_crop;
return $this;
}
}