<?phpnamespace App\Entity;use App\Repository\ProjectOrderTaskFulfillmentDateRevisionRepository;use Doctrine\ORM\Mapping as ORM;use Symfony\Component\Serializer\Annotation\Groups;/** * Task execution TARİH REVİZYONU — gerekçeli zincir (kullanıcı kararı 2026-08-11). * * planned_start_at / planned_end_at ERP'nin ÖNERİSİ olarak KALIR (anlamı değişmez). İcracının * taahhüdü + her tarih değişikliğinin gerekçesi BU tabloda tutulur. GÜNCEL tarih = EN SON revizyon * (committed_* fulfillment'ta bundan türetilir). İlk satır = KABUL anı (reason NULL — değişiklik * değil, ilk karar); sonraki her satır = gerekçeli revizyon (reason ZORUNLU, gerçek kapı BE'de). * * @ORM\Entity(repositoryClass=ProjectOrderTaskFulfillmentDateRevisionRepository::class) * @ORM\Table(name="project_order_task_fulfillment_date_revisions") */class ProjectOrderTaskFulfillmentDateRevision{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") * @Groups({ * "project_order_task_fulfillment_date_revision@core" * }) */ private $id; /** * @ORM\ManyToOne(targetEntity=ProjectOrderTaskFulfillment::class, inversedBy="date_revisions") * @ORM\JoinColumn(nullable=false, onDelete="CASCADE") */ private $project_order_task_fulfillment; /** * @ORM\Column(type="datetime_immutable") * @Groups({ * "project_order_task_fulfillment_date_revision@core" * }) */ private $start_at; /** * @ORM\Column(type="datetime_immutable") * @Groups({ * "project_order_task_fulfillment_date_revision@core" * }) */ private $end_at; /** * İlk (accept) satırında NULL — sonraki her revizyonda ZORUNLU (BE 422 ile zorlar). * * @ORM\Column(type="string", length=1000, nullable=true) * @Groups({ * "project_order_task_fulfillment_date_revision@core" * }) */ private $reason; /** * Gerekçe KATEGORİSİ (enum) — serbest metnin YANINDA (kullanıcı kararı 2026-08-11). `reason` ile * aynı dolulukta: revizyonda zorunlu, accept'te sapma varsa zorunlu, aksi halde null. Değerler * App\Enum\TaskExecutionReasonCategoryEnum (supply/personnel/weather/scope_change/other). * * @ORM\Column(type="task_execution_reason_category", nullable=true) * @Groups({ * "project_order_task_fulfillment_date_revision@core" * }) */ private $reason_category; /** * @ORM\Column(type="datetime_immutable") * @Groups({ * "project_order_task_fulfillment_date_revision@core" * }) */ private $created_at; public function getId(): ?int { return $this->id; } public function getProjectOrderTaskFulfillment(): ?ProjectOrderTaskFulfillment { return $this->project_order_task_fulfillment; } public function setProjectOrderTaskFulfillment(?ProjectOrderTaskFulfillment $fulfillment): self { $this->project_order_task_fulfillment = $fulfillment; return $this; } public function getStartAt(): ?\DateTimeImmutable { return $this->start_at; } public function setStartAt(\DateTimeImmutable $start_at): self { $this->start_at = $start_at; return $this; } public function getEndAt(): ?\DateTimeImmutable { return $this->end_at; } public function setEndAt(\DateTimeImmutable $end_at): self { $this->end_at = $end_at; return $this; } public function getReason(): ?string { return $this->reason; } public function setReason(?string $reason): self { $this->reason = $reason; return $this; } public function getReasonCategory(): ?string { return $this->reason_category; } public function setReasonCategory(?string $reason_category): self { $this->reason_category = $reason_category; return $this; } public function getCreatedAt(): ?\DateTimeImmutable { return $this->created_at; } public function setCreatedAt(\DateTimeImmutable $created_at): self { $this->created_at = $created_at; return $this; }}