src/Entity/CRM/OrderHistory.php line 11

  1. <?php
  2. namespace App\Entity\CRM;
  3. use App\Repository\OrderHistoryRepository;
  4. use DateTime;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassOrderHistoryRepository::class)]
  8. class OrderHistory
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  15.     private ?\DateTimeInterface $dateAdded null;
  16.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  17.     private ?string $comment null;
  18.     #[ORM\ManyToOne(inversedBy'orderHistories')]
  19.     #[ORM\JoinColumn(nullablefalse)]
  20.     private ?Order $orderId null;
  21.     #[ORM\ManyToOne(inversedBy'orderHistories')]
  22.     #[ORM\JoinColumn(nullabletrue)]
  23.     private ?Admin $admin null;
  24.     #[ORM\ManyToOne(inversedBy'orderHistories')]
  25.     private ?Consultant $consultant null;
  26.     public function __construct()
  27.     {
  28.         $this->dateAdded = new DateTime();
  29.     }
  30.     public function getId(): ?int
  31.     {
  32.         return $this->id;
  33.     }
  34.     public function getDateAdded(): ?\DateTimeInterface
  35.     {
  36.         return $this->dateAdded;
  37.     }
  38.     public function setDateAdded(\DateTimeInterface $dateAdded): self
  39.     {
  40.         $this->dateAdded $dateAdded;
  41.         return $this;
  42.     }
  43.     public function getComment(): ?string
  44.     {
  45.         return $this->comment;
  46.     }
  47.     public function setComment(?string $comment): self
  48.     {
  49.         $this->comment $comment;
  50.         return $this;
  51.     }
  52.     public function getOrderId(): ?Order
  53.     {
  54.         return $this->orderId;
  55.     }
  56.     public function setOrderId(?Order $orderId): self
  57.     {
  58.         $this->orderId $orderId;
  59.         return $this;
  60.     }
  61.     public function getAdmin(): ?Admin
  62.     {
  63.         return $this->admin;
  64.     }
  65.     public function setAdmin(?Admin $admin): self
  66.     {
  67.         $this->admin $admin;
  68.         return $this;
  69.     }
  70.     public function getConsultant(): ?Consultant
  71.     {
  72.         return $this->consultant;
  73.     }
  74.     public function setConsultant(?Consultant $consultant): static
  75.     {
  76.         $this->consultant $consultant;
  77.         return $this;
  78.     }
  79. }