src/Entity/IncidentUpdate.php line 12

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\IncidentUpdateRepository;
  4. use App\Traits\TimeStampTrait;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassIncidentUpdateRepository::class)]
  8. #[ORM\HasLifecycleCallbacks]
  9. class IncidentUpdate
  10. {
  11.     use TimeStampTrait;
  12.     #[ORM\Id]
  13.     #[ORM\GeneratedValue]
  14.     #[ORM\Column(type'integer')]
  15.     private $id;
  16.     #[ORM\Column(length50)]
  17.     private ?string $code null;
  18.     #[ORM\Column(type'text')]
  19.     private ?string $description null;
  20.     #[ORM\ManyToOne(inversedBy'incidentUpdates')]
  21.     private ?Incident $incident null;
  22.     #[ORM\ManyToOne(inversedBy'incidentUpdates')]
  23.     private ?User $createdBy null;
  24.     #[ORM\Column(typeTypes::DECIMALprecision10scale2nullabletrue)]
  25.     private ?string $depense null;
  26.     #[ORM\ManyToOne(inversedBy'incidentUpdates')]
  27.     private ?Entreprise $marchand null;
  28.     #[ORM\Column(typeTypes::DATE_MUTABLEnullabletrue)]
  29.     private ?\DateTimeInterface $incidentDate null;
  30.     /**
  31.      * Set id.
  32.      *
  33.      * @param int $id
  34.      *
  35.      * @return Habitat
  36.      */
  37.     public function setId($id)
  38.     {
  39.         $this->id $id;
  40.         return $this;
  41.     }
  42.     public function getId()
  43.     {
  44.         return $this->id;
  45.     }
  46.     public function getCode(): ?string
  47.     {
  48.         return $this->code;
  49.     }
  50.     public function setCode(string $code): static
  51.     {
  52.         $this->code $code;
  53.         return $this;
  54.     }
  55.     public function getDescription(): ?string
  56.     {
  57.         return $this->description;
  58.     }
  59.     public function setDescription(string $description): static
  60.     {
  61.         $this->description $description;
  62.         return $this;
  63.     }
  64.     public function getIncident(): ?Incident
  65.     {
  66.         return $this->incident;
  67.     }
  68.     public function setIncident(?Incident $incident): static
  69.     {
  70.         $this->incident $incident;
  71.         return $this;
  72.     }
  73.     public function getCreatedBy(): ?User
  74.     {
  75.         return $this->createdBy;
  76.     }
  77.     public function setCreatedBy(?User $createdBy): static
  78.     {
  79.         $this->createdBy $createdBy;
  80.         return $this;
  81.     }
  82.     public function getDepense(): ?string
  83.     {
  84.         return $this->depense;
  85.     }
  86.     public function setDepense(?string $depense): static
  87.     {
  88.         $this->depense $depense;
  89.         return $this;
  90.     }
  91.     public function getMarchand(): ?Entreprise
  92.     {
  93.         return $this->marchand;
  94.     }
  95.     public function setMarchand(?Entreprise $marchand): static
  96.     {
  97.         $this->marchand $marchand;
  98.         return $this;
  99.     }
  100.     public function getIncidentDate(): ?\DateTimeInterface
  101.     {
  102.         return $this->incidentDate;
  103.     }
  104.     public function setIncidentDate(?\DateTimeInterface $incidentDate): static
  105.     {
  106.         $this->incidentDate $incidentDate;
  107.         return $this;
  108.     }
  109. }