src/Entity/Todo.php line 8

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. #[ORM\Table(name'todo')]
  5. #[ORM\Index(columns: ['type'], name'ix_type')]
  6. #[ORM\Entity(repositoryClass'App\Entity\Repository\TodoRepository')]
  7. class Todo
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\Column(type'bigint')]
  11.     #[ORM\GeneratedValue(strategy'AUTO')]
  12.     private $id;
  13.     #[ORM\Column(type'string'nullabletrue)]
  14.     private $title;
  15.     #[ORM\Column(type'text'nullabletrue)]
  16.     private $text;
  17.     #[ORM\Column(type'string'nullabletrue)]
  18.     private $type;
  19.     #[ORM\Column(type'string'nullabletrue)]
  20.     private $category;
  21.     #[ORM\Column(type'json'nullabletrue)]
  22.     private $additional_information;
  23.     #[ORM\Column(type'datetime'nullabletrue)]
  24.     private $notification_sent;
  25.     #[ORM\Column(type'string'nullabletrue)]
  26.     private $notification_type;
  27.     #[ORM\Column(type'integer'nullabletrue)]
  28.     private $priority;
  29.     #[ORM\Column(type'boolean'nullabletrue)]
  30.     private $is_custom;
  31.     #[ORM\Column(type'datetime'nullabletrue)]
  32.     private $date_due;
  33.     #[ORM\Column(type'datetime'nullabletrue)]
  34.     private $original_date_due;
  35.     #[ORM\Column(type'datetime'nullabletrue)]
  36.     private $date_done;
  37.     #[ORM\Column(type'datetime'nullabletrue)]
  38.     private $date_created;
  39.     #[ORM\ManyToOne(targetEntity'App\Entity\PatchfieldGroup'inversedBy'todo')]
  40.     #[ORM\JoinColumn(name'patchfield_group_id'referencedColumnName'id')]
  41.     private $patchfieldGroup;
  42.     #[ORM\ManyToOne(targetEntity'App\Entity\User'inversedBy'todo')]
  43.     #[ORM\JoinColumn(name'user_id'referencedColumnName'id')]
  44.     private $user;
  45.     /** @var string */
  46.     private $cropName;
  47.     #[ORM\Column(type'string'length255nullabletrue)]
  48.     private $repeat_interval;
  49.     #[ORM\Column(type'array'nullabletrue)]
  50.     private $crops;
  51.     #[ORM\Column(type'integer'nullabletrue)]
  52.     private $days_after_seeding;
  53.     #[ORM\ManyToOne(targetEntityTodo::class)]
  54.     private $parent_todo;
  55.     #[ORM\ManyToOne(targetEntityPlant::class, inversedBy'todos')]
  56.     #[ORM\JoinColumn(name'plant_id'onDelete'CASCADE')]
  57.     private $plant;
  58.     #[ORM\ManyToOne(targetEntityGarden::class, inversedBy'todos')]
  59.     private $garden;
  60.     #[ORM\ManyToOne(targetEntityCrop::class)]
  61.     private $crop;
  62.     #[ORM\ManyToOne]
  63.     private ?Crop $variety null;
  64.     #[ORM\Column(length32nullabletrue)]
  65.     private ?string $hash null;
  66.     public function __clone() {
  67.         $this->id null;
  68.     }
  69.     public function getId(): ?int
  70.     {
  71.         return $this->id;
  72.     }
  73.     public function getTitle(): ?string
  74.     {
  75.         return $this->title;
  76.     }
  77.     public function setTitle(?string $title): self
  78.     {
  79.         $this->title $title;
  80.         return $this;
  81.     }
  82.     public function getText(): ?string
  83.     {
  84.         return $this->text;
  85.     }
  86.     public function setText(?string $text): self
  87.     {
  88.         $this->text $text;
  89.         return $this;
  90.     }
  91.     public function getNotificationSent(): ?\DateTimeInterface
  92.     {
  93.         return $this->notification_sent;
  94.     }
  95.     public function setNotificationSent(?\DateTimeInterface $notification_sent): self
  96.     {
  97.         $this->notification_sent $notification_sent;
  98.         return $this;
  99.     }
  100.     public function getNotificationType(): ?string
  101.     {
  102.         return $this->notification_type;
  103.     }
  104.     public function setNotificationType(?string $notification_type): self
  105.     {
  106.         $this->notification_type $notification_type;
  107.         return $this;
  108.     }
  109.     public function getDateCreated(): ?\DateTimeInterface
  110.     {
  111.         return $this->date_created;
  112.     }
  113.     public function setDateCreated(?\DateTimeInterface $date_created): self
  114.     {
  115.         $this->date_created $date_created;
  116.         return $this;
  117.     }
  118.     public function getPatchfieldGroup(): ?PatchfieldGroup
  119.     {
  120.         return $this->patchfieldGroup;
  121.     }
  122.     public function setPatchfieldGroup(?PatchfieldGroup $patchfieldGroup): self
  123.     {
  124.         $this->patchfieldGroup $patchfieldGroup;
  125.         return $this;
  126.     }
  127.     public function getUser(): ?User
  128.     {
  129.         return $this->user;
  130.     }
  131.     public function setUser(?User $user): self
  132.     {
  133.         $this->user $user;
  134.         return $this;
  135.     }
  136.     public function getCategory(): ?string
  137.     {
  138.         return $this->category;
  139.     }
  140.     public function setCategory(?string $category): self
  141.     {
  142.         $this->category $category;
  143.         return $this;
  144.     }
  145.     public function getDateDone(): ?\DateTimeInterface
  146.     {
  147.         return $this->date_done;
  148.     }
  149.     public function setDateDone(?\DateTimeInterface $date_done): self
  150.     {
  151.         $this->date_done $date_done;
  152.         return $this;
  153.     }
  154.     public function getDateDue(): ?\DateTimeInterface
  155.     {
  156.         return $this->date_due;
  157.     }
  158.     public function setDateDue(?\DateTimeInterface $date_due): self
  159.     {
  160.         $this->date_due $date_due;
  161.         return $this;
  162.     }
  163.     public function getPriority(): ?int
  164.     {
  165.         return $this->priority;
  166.     }
  167.     public function setPriority(?int $priority): self
  168.     {
  169.         $this->priority $priority;
  170.         return $this;
  171.     }
  172.     public function setCropName(?string $cropName): self {
  173.         $this->cropName $cropName;
  174.         return $this;
  175.     }
  176.     public function getCropName(): ?string {
  177.         return $this->cropName;
  178.     }
  179.     public function getAdditionalInformation(): ?array
  180.     {
  181.         return $this->additional_information;
  182.     }
  183.     public function setAdditionalInformation(?array $additional_information): self
  184.     {
  185.         $this->additional_information $additional_information;
  186.         return $this;
  187.     }
  188.     public function getIsCustom(): ?bool
  189.     {
  190.         return $this->is_custom;
  191.     }
  192.     public function setIsCustom(?bool $is_custom): self
  193.     {
  194.         $this->is_custom $is_custom;
  195.         return $this;
  196.     }
  197.     public function getOriginalDateDue(): ?\DateTimeInterface
  198.     {
  199.         return $this->original_date_due;
  200.     }
  201.     public function setOriginalDateDue(?\DateTimeInterface $original_date_due): self
  202.     {
  203.         $this->original_date_due $original_date_due;
  204.         return $this;
  205.     }
  206.     public function getType(): ?string
  207.     {
  208.         return $this->type;
  209.     }
  210.     public function setType(?string $type): self
  211.     {
  212.         $this->type $type;
  213.         return $this;
  214.     }
  215.     public function getRepeatInterval(): ?string
  216.     {
  217.         return $this->repeat_interval;
  218.     }
  219.     public function setRepeatInterval(?string $repeat_interval): self
  220.     {
  221.         $this->repeat_interval $repeat_interval;
  222.         return $this;
  223.     }
  224.     public function getCrops(): ?array
  225.     {
  226.         return $this->crops;
  227.     }
  228.     public function setCrops(?array $crops): self
  229.     {
  230.         $this->crops $crops;
  231.         return $this;
  232.     }
  233.     public function getDaysAfterSeeding(): ?int
  234.     {
  235.         return $this->days_after_seeding;
  236.     }
  237.     public function setDaysAfterSeeding(?int $days_after_seeding): self
  238.     {
  239.         $this->days_after_seeding $days_after_seeding;
  240.         return $this;
  241.     }
  242.     public function getParentTodo(): ?self
  243.     {
  244.         return $this->parent_todo;
  245.     }
  246.     public function setParentTodo(?self $parent_todo): self
  247.     {
  248.         $this->parent_todo $parent_todo;
  249.         return $this;
  250.     }
  251.     public function getPlant(): ?Plant
  252.     {
  253.         return $this->plant;
  254.     }
  255.     public function setPlant(?Plant $plant): self
  256.     {
  257.         $this->plant $plant;
  258.         return $this;
  259.     }
  260.     public function getGarden(): ?Garden
  261.     {
  262.         return $this->garden;
  263.     }
  264.     public function setGarden(?Garden $garden): self
  265.     {
  266.         $this->garden $garden;
  267.         return $this;
  268.     }
  269.     public function getCrop(): ?Crop
  270.     {
  271.         return $this->crop;
  272.     }
  273.     public function setCrop(?Crop $crop): self
  274.     {
  275.         $this->crop $crop;
  276.         return $this;
  277.     }
  278.     public function getVariety(): ?Crop
  279.     {
  280.         return $this->variety;
  281.     }
  282.     public function setVariety(?Crop $variety): self
  283.     {
  284.         $this->variety $variety;
  285.         return $this;
  286.     }
  287.     public function getHash(): ?string
  288.     {
  289.         return $this->hash;
  290.     }
  291.     public function setHash(?string $hash): static
  292.     {
  293.         $this->hash $hash;
  294.         return $this;
  295.     }
  296. }