src/Entity/Milestone.php line 15

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\MilestoneRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Gedmo\Mapping\Annotation as Gedmo;
  7. use Gedmo\Timestampable\Traits\TimestampableEntity;
  8. use Gedmo\SoftDeleteable\Traits\SoftDeleteableEntity;
  9. use Symfony\Component\Uid\Uuid;
  10. #[ORM\Entity(repositoryClassMilestoneRepository::class)]
  11. #[Gedmo\SoftDeleteable(fieldName'deletedAt'timeAwarefalsehardDeletetrue)]
  12. class Milestone
  13. {
  14.     use TimestampableEntity;
  15.     use SoftDeleteableEntity;
  16.     #[ORM\Id]
  17.     #[ORM\GeneratedValue(strategy'CUSTOM')]
  18.     #[ORM\Column(type'uuid'uniquetrue)]
  19.     #[ORM\CustomIdGenerator(class: 'doctrine.uuid_generator')]
  20.     private ?Uuid $id null;
  21.     #[ORM\Column(length255)]
  22.     private ?string $title null;
  23.     #[ORM\Column(length191uniquetrue)]
  24.     #[Gedmo\Slug(fields: ['title'])]
  25.     private ?string $slug null;
  26.     #[ORM\Column(typeTypes::TEXT)]
  27.     private ?string $description null;
  28.     #[ORM\Column]
  29.     private ?bool $archived false;
  30.     #[ORM\ManyToOne(inversedBy'milestones')]
  31.     private ?Challenge $challenge null;
  32.     #[ORM\Column(type'date'nullabletrue)]
  33.     private ?\DateTimeInterface $date null;
  34.     public function __toString() {
  35.         return $this->title;
  36.     }
  37.     public function getId(): ?Uuid
  38.     {
  39.         return $this->id;
  40.     }
  41.     public function getTitle(): ?string
  42.     {
  43.         return $this->title;
  44.     }
  45.     public function setTitle(string $title): self
  46.     {
  47.         $this->title $title;
  48.         return $this;
  49.     }
  50.     public function getSlug(): ?string
  51.     {
  52.         return $this->slug;
  53.     }
  54.     public function setSlug(string $slug): self
  55.     {
  56.         $this->slug $slug;
  57.         return $this;
  58.     }
  59.     public function getDescription(): ?string
  60.     {
  61.         return $this->description;
  62.     }
  63.     public function setDescription(string $description): self
  64.     {
  65.         $this->description $description;
  66.         return $this;
  67.     }
  68.     public function isArchived(): ?bool
  69.     {
  70.         return $this->archived;
  71.     }
  72.     public function setArchived(bool $archived): self
  73.     {
  74.         $this->archived $archived;
  75.         return $this;
  76.     }
  77.     public function getChallenge(): ?Challenge
  78.     {
  79.         return $this->challenge;
  80.     }
  81.     public function setChallenge(?Challenge $challenge): self
  82.     {
  83.         $this->challenge $challenge;
  84.         return $this;
  85.     }
  86.     public function getDate(): ?\DateTimeInterface
  87.     {
  88.         return $this->date;
  89.     }
  90.     public function setDate(?\DateTimeInterface $date): self
  91.     {
  92.         $this->date $date;
  93.         return $this;
  94.     }
  95. }