src/Entity/PlanAssignment.php line 11
<?phpnamespace App\Entity;use App\Repository\PlanAssignmentRepository;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;use Gedmo\Timestampable\Traits\TimestampableEntity;#[ORM\Entity(repositoryClass: PlanAssignmentRepository::class)]class PlanAssignment{use TimestampableEntity;#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\ManyToOne(fetch: 'EAGER', inversedBy: 'planAssignments')]#[ORM\JoinColumn(nullable: false)]private ?Plan $plan = null;#[ORM\ManyToOne(fetch: 'EAGER', inversedBy: 'planAssignments')]private ?Title $title = null;#[ORM\Column(type: Types::DATE_MUTABLE, nullable: true)]private ?\DateTimeInterface $startDate = null;#[ORM\Column(type: Types::DATE_MUTABLE, nullable: true)]private ?\DateTimeInterface $endDate = null;public function getId(): ?int{return $this->id;}public function getPlan(): ?Plan{return $this->plan;}public function setPlan(?Plan $plan): static{$this->plan = $plan;return $this;}public function getTitle(): ?Title{return $this->title;}public function setTitle(?Title $title): static{$this->title = $title;return $this;}public function getStartDate(): ?\DateTimeInterface{return $this->startDate;}public function setStartDate(?\DateTimeInterface $startDate): static{$this->startDate = $startDate;return $this;}public function getEndDate(): ?\DateTimeInterface{return $this->endDate;}public function setEndDate(?\DateTimeInterface $endDate): static{$this->endDate = $endDate;return $this;}public function __toString(): string{return sprintf('%s - %s', $this->title->getName(), $this->startDate->format('Y-m-d'));}}