src/Entity/ProjectOrderTaskFulfillmentDateRevision.php line 20

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ProjectOrderTaskFulfillmentDateRevisionRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Serializer\Annotation\Groups;
  6. /**
  7.  * Task execution TARİH REVİZYONU — gerekçeli zincir (kullanıcı kararı 2026-08-11).
  8.  *
  9.  * planned_start_at / planned_end_at ERP'nin ÖNERİSİ olarak KALIR (anlamı değişmez). İcracının
  10.  * taahhüdü + her tarih değişikliğinin gerekçesi BU tabloda tutulur. GÜNCEL tarih = EN SON revizyon
  11.  * (committed_* fulfillment'ta bundan türetilir). İlk satır = KABUL anı (reason NULL — değişiklik
  12.  * değil, ilk karar); sonraki her satır = gerekçeli revizyon (reason ZORUNLU, gerçek kapı BE'de).
  13.  *
  14.  * @ORM\Entity(repositoryClass=ProjectOrderTaskFulfillmentDateRevisionRepository::class)
  15.  * @ORM\Table(name="project_order_task_fulfillment_date_revisions")
  16.  */
  17. class ProjectOrderTaskFulfillmentDateRevision
  18. {
  19.     /**
  20.      * @ORM\Id
  21.      * @ORM\GeneratedValue
  22.      * @ORM\Column(type="integer")
  23.      * @Groups({
  24.      *     "project_order_task_fulfillment_date_revision@core"
  25.      * })
  26.      */
  27.     private $id;
  28.     /**
  29.      * @ORM\ManyToOne(targetEntity=ProjectOrderTaskFulfillment::class, inversedBy="date_revisions")
  30.      * @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
  31.      */
  32.     private $project_order_task_fulfillment;
  33.     /**
  34.      * @ORM\Column(type="datetime_immutable")
  35.      * @Groups({
  36.      *     "project_order_task_fulfillment_date_revision@core"
  37.      * })
  38.      */
  39.     private $start_at;
  40.     /**
  41.      * @ORM\Column(type="datetime_immutable")
  42.      * @Groups({
  43.      *     "project_order_task_fulfillment_date_revision@core"
  44.      * })
  45.      */
  46.     private $end_at;
  47.     /**
  48.      * İlk (accept) satırında NULL — sonraki her revizyonda ZORUNLU (BE 422 ile zorlar).
  49.      *
  50.      * @ORM\Column(type="string", length=1000, nullable=true)
  51.      * @Groups({
  52.      *     "project_order_task_fulfillment_date_revision@core"
  53.      * })
  54.      */
  55.     private $reason;
  56.     /**
  57.      * Gerekçe KATEGORİSİ (enum) — serbest metnin YANINDA (kullanıcı kararı 2026-08-11). `reason` ile
  58.      * aynı dolulukta: revizyonda zorunlu, accept'te sapma varsa zorunlu, aksi halde null. Değerler
  59.      * App\Enum\TaskExecutionReasonCategoryEnum (supply/personnel/weather/scope_change/other).
  60.      *
  61.      * @ORM\Column(type="task_execution_reason_category", nullable=true)
  62.      * @Groups({
  63.      *     "project_order_task_fulfillment_date_revision@core"
  64.      * })
  65.      */
  66.     private $reason_category;
  67.     /**
  68.      * @ORM\Column(type="datetime_immutable")
  69.      * @Groups({
  70.      *     "project_order_task_fulfillment_date_revision@core"
  71.      * })
  72.      */
  73.     private $created_at;
  74.     public function getId(): ?int
  75.     {
  76.         return $this->id;
  77.     }
  78.     public function getProjectOrderTaskFulfillment(): ?ProjectOrderTaskFulfillment
  79.     {
  80.         return $this->project_order_task_fulfillment;
  81.     }
  82.     public function setProjectOrderTaskFulfillment(?ProjectOrderTaskFulfillment $fulfillment): self
  83.     {
  84.         $this->project_order_task_fulfillment = $fulfillment;
  85.         return $this;
  86.     }
  87.     public function getStartAt(): ?\DateTimeImmutable
  88.     {
  89.         return $this->start_at;
  90.     }
  91.     public function setStartAt(\DateTimeImmutable $start_at): self
  92.     {
  93.         $this->start_at = $start_at;
  94.         return $this;
  95.     }
  96.     public function getEndAt(): ?\DateTimeImmutable
  97.     {
  98.         return $this->end_at;
  99.     }
  100.     public function setEndAt(\DateTimeImmutable $end_at): self
  101.     {
  102.         $this->end_at = $end_at;
  103.         return $this;
  104.     }
  105.     public function getReason(): ?string
  106.     {
  107.         return $this->reason;
  108.     }
  109.     public function setReason(?string $reason): self
  110.     {
  111.         $this->reason = $reason;
  112.         return $this;
  113.     }
  114.     public function getReasonCategory(): ?string
  115.     {
  116.         return $this->reason_category;
  117.     }
  118.     public function setReasonCategory(?string $reason_category): self
  119.     {
  120.         $this->reason_category = $reason_category;
  121.         return $this;
  122.     }
  123.     public function getCreatedAt(): ?\DateTimeImmutable
  124.     {
  125.         return $this->created_at;
  126.     }
  127.     public function setCreatedAt(\DateTimeImmutable $created_at): self
  128.     {
  129.         $this->created_at = $created_at;
  130.         return $this;
  131.     }
  132. }