<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Table(name: 'todo')]
#[ORM\Index(columns: ['type'], name: 'ix_type')]
#[ORM\Entity(repositoryClass: 'App\Entity\Repository\TodoRepository')]
class Todo
{
#[ORM\Id]
#[ORM\Column(type: 'bigint')]
#[ORM\GeneratedValue(strategy: 'AUTO')]
private $id;
#[ORM\Column(type: 'string', nullable: true)]
private $title;
#[ORM\Column(type: 'text', nullable: true)]
private $text;
#[ORM\Column(type: 'string', nullable: true)]
private $type;
#[ORM\Column(type: 'string', nullable: true)]
private $category;
#[ORM\Column(type: 'json', nullable: true)]
private $additional_information;
#[ORM\Column(type: 'datetime', nullable: true)]
private $notification_sent;
#[ORM\Column(type: 'string', nullable: true)]
private $notification_type;
#[ORM\Column(type: 'integer', nullable: true)]
private $priority;
#[ORM\Column(type: 'boolean', nullable: true)]
private $is_custom;
#[ORM\Column(type: 'datetime', nullable: true)]
private $date_due;
#[ORM\Column(type: 'datetime', nullable: true)]
private $original_date_due;
#[ORM\Column(type: 'datetime', nullable: true)]
private $date_done;
#[ORM\Column(type: 'datetime', nullable: true)]
private $date_created;
#[ORM\ManyToOne(targetEntity: 'App\Entity\PatchfieldGroup', inversedBy: 'todo')]
#[ORM\JoinColumn(name: 'patchfield_group_id', referencedColumnName: 'id')]
private $patchfieldGroup;
#[ORM\ManyToOne(targetEntity: 'App\Entity\User', inversedBy: 'todo')]
#[ORM\JoinColumn(name: 'user_id', referencedColumnName: 'id')]
private $user;
/** @var string */
private $cropName;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $repeat_interval;
#[ORM\Column(type: 'array', nullable: true)]
private $crops;
#[ORM\Column(type: 'integer', nullable: true)]
private $days_after_seeding;
#[ORM\ManyToOne(targetEntity: Todo::class)]
private $parent_todo;
#[ORM\ManyToOne(targetEntity: Plant::class, inversedBy: 'todos')]
#[ORM\JoinColumn(name: 'plant_id', onDelete: 'CASCADE')]
private $plant;
#[ORM\ManyToOne(targetEntity: Garden::class, inversedBy: 'todos')]
private $garden;
#[ORM\ManyToOne(targetEntity: Crop::class)]
private $crop;
#[ORM\ManyToOne]
private ?Crop $variety = null;
#[ORM\Column(length: 32, nullable: true)]
private ?string $hash = null;
public function __clone() {
$this->id = null;
}
public function getId(): ?int
{
return $this->id;
}
public function getTitle(): ?string
{
return $this->title;
}
public function setTitle(?string $title): self
{
$this->title = $title;
return $this;
}
public function getText(): ?string
{
return $this->text;
}
public function setText(?string $text): self
{
$this->text = $text;
return $this;
}
public function getNotificationSent(): ?\DateTimeInterface
{
return $this->notification_sent;
}
public function setNotificationSent(?\DateTimeInterface $notification_sent): self
{
$this->notification_sent = $notification_sent;
return $this;
}
public function getNotificationType(): ?string
{
return $this->notification_type;
}
public function setNotificationType(?string $notification_type): self
{
$this->notification_type = $notification_type;
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 getPatchfieldGroup(): ?PatchfieldGroup
{
return $this->patchfieldGroup;
}
public function setPatchfieldGroup(?PatchfieldGroup $patchfieldGroup): self
{
$this->patchfieldGroup = $patchfieldGroup;
return $this;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
public function getCategory(): ?string
{
return $this->category;
}
public function setCategory(?string $category): self
{
$this->category = $category;
return $this;
}
public function getDateDone(): ?\DateTimeInterface
{
return $this->date_done;
}
public function setDateDone(?\DateTimeInterface $date_done): self
{
$this->date_done = $date_done;
return $this;
}
public function getDateDue(): ?\DateTimeInterface
{
return $this->date_due;
}
public function setDateDue(?\DateTimeInterface $date_due): self
{
$this->date_due = $date_due;
return $this;
}
public function getPriority(): ?int
{
return $this->priority;
}
public function setPriority(?int $priority): self
{
$this->priority = $priority;
return $this;
}
public function setCropName(?string $cropName): self {
$this->cropName = $cropName;
return $this;
}
public function getCropName(): ?string {
return $this->cropName;
}
public function getAdditionalInformation(): ?array
{
return $this->additional_information;
}
public function setAdditionalInformation(?array $additional_information): self
{
$this->additional_information = $additional_information;
return $this;
}
public function getIsCustom(): ?bool
{
return $this->is_custom;
}
public function setIsCustom(?bool $is_custom): self
{
$this->is_custom = $is_custom;
return $this;
}
public function getOriginalDateDue(): ?\DateTimeInterface
{
return $this->original_date_due;
}
public function setOriginalDateDue(?\DateTimeInterface $original_date_due): self
{
$this->original_date_due = $original_date_due;
return $this;
}
public function getType(): ?string
{
return $this->type;
}
public function setType(?string $type): self
{
$this->type = $type;
return $this;
}
public function getRepeatInterval(): ?string
{
return $this->repeat_interval;
}
public function setRepeatInterval(?string $repeat_interval): self
{
$this->repeat_interval = $repeat_interval;
return $this;
}
public function getCrops(): ?array
{
return $this->crops;
}
public function setCrops(?array $crops): self
{
$this->crops = $crops;
return $this;
}
public function getDaysAfterSeeding(): ?int
{
return $this->days_after_seeding;
}
public function setDaysAfterSeeding(?int $days_after_seeding): self
{
$this->days_after_seeding = $days_after_seeding;
return $this;
}
public function getParentTodo(): ?self
{
return $this->parent_todo;
}
public function setParentTodo(?self $parent_todo): self
{
$this->parent_todo = $parent_todo;
return $this;
}
public function getPlant(): ?Plant
{
return $this->plant;
}
public function setPlant(?Plant $plant): self
{
$this->plant = $plant;
return $this;
}
public function getGarden(): ?Garden
{
return $this->garden;
}
public function setGarden(?Garden $garden): self
{
$this->garden = $garden;
return $this;
}
public function getCrop(): ?Crop
{
return $this->crop;
}
public function setCrop(?Crop $crop): self
{
$this->crop = $crop;
return $this;
}
public function getVariety(): ?Crop
{
return $this->variety;
}
public function setVariety(?Crop $variety): self
{
$this->variety = $variety;
return $this;
}
public function getHash(): ?string
{
return $this->hash;
}
public function setHash(?string $hash): static
{
$this->hash = $hash;
return $this;
}
}