src/Entity/Milestone.php line 15
<?php
namespace App\Entity;
use App\Repository\MilestoneRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Gedmo\Timestampable\Traits\TimestampableEntity;
use Gedmo\SoftDeleteable\Traits\SoftDeleteableEntity;
use Symfony\Component\Uid\Uuid;
#[ORM\Entity(repositoryClass: MilestoneRepository::class)]
#[Gedmo\SoftDeleteable(fieldName: 'deletedAt', timeAware: false, hardDelete: true)]
class Milestone
{
use TimestampableEntity;
use SoftDeleteableEntity;
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'CUSTOM')]
#[ORM\Column(type: 'uuid', unique: true)]
#[ORM\CustomIdGenerator(class: 'doctrine.uuid_generator')]
private ?Uuid $id = null;
#[ORM\Column(length: 255)]
private ?string $title = null;
#[ORM\Column(length: 191, unique: true)]
#[Gedmo\Slug(fields: ['title'])]
private ?string $slug = null;
#[ORM\Column(type: Types::TEXT)]
private ?string $description = null;
#[ORM\Column]
private ?bool $archived = false;
#[ORM\ManyToOne(inversedBy: 'milestones')]
private ?Challenge $challenge = null;
#[ORM\Column(type: 'date', nullable: true)]
private ?\DateTimeInterface $date = null;
public function __toString() {
return $this->title;
}
public function getId(): ?Uuid
{
return $this->id;
}
public function getTitle(): ?string
{
return $this->title;
}
public function setTitle(string $title): self
{
$this->title = $title;
return $this;
}
public function getSlug(): ?string
{
return $this->slug;
}
public function setSlug(string $slug): self
{
$this->slug = $slug;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(string $description): self
{
$this->description = $description;
return $this;
}
public function isArchived(): ?bool
{
return $this->archived;
}
public function setArchived(bool $archived): self
{
$this->archived = $archived;
return $this;
}
public function getChallenge(): ?Challenge
{
return $this->challenge;
}
public function setChallenge(?Challenge $challenge): self
{
$this->challenge = $challenge;
return $this;
}
public function getDate(): ?\DateTimeInterface
{
return $this->date;
}
public function setDate(?\DateTimeInterface $date): self
{
$this->date = $date;
return $this;
}
}