src/Flexy/ShopBundle/Entity/Order/NotificationOrder.php line 10

  1. <?php
  2. namespace App\Flexy\ShopBundle\Entity\Order;
  3. use App\Flexy\ShopBundle\Repository\Order\NotificationOrderRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassNotificationOrderRepository::class)]
  6. class NotificationOrder
  7. {
  8.     #[ORM\Id]
  9.     #[ORM\GeneratedValue]
  10.     #[ORM\Column]
  11.     private ?int $id null;
  12.     #[ORM\Column(nullabletrue)]
  13.     private ?bool $isRead false;
  14.     #[ORM\ManyToOne(inversedBy'notificationOrders')]
  15.     private ?Order $sourceOrder null;
  16.     #[ORM\Column(nullabletrue)]
  17.     private ?\DateTimeImmutable $createdAt null;
  18.     
  19.     #[ORM\Column(length255nullabletrue)]
  20.     private ?string $created_by null;
  21.     public function __construct()
  22.     {
  23.         $this->createdAt = new \DateTimeImmutable();
  24.         $this->isRead false;
  25.     }
  26.     public function getId(): ?int
  27.     {
  28.         return $this->id;
  29.     }
  30.     public function isIsRead(): ?bool
  31.     {
  32.         return $this->isRead;
  33.     }
  34.     public function setIsRead(?bool $isRead): static
  35.     {
  36.         $this->isRead $isRead;
  37.         return $this;
  38.     }
  39.     public function getSourceOrder(): ?Order
  40.     {
  41.         return $this->sourceOrder;
  42.     }
  43.     public function setSourceOrder(?Order $sourceOrder): static
  44.     {
  45.         $this->sourceOrder $sourceOrder;
  46.         return $this;
  47.     }
  48.     public function getCreatedAt(): ?\DateTimeImmutable
  49.     {
  50.         return $this->createdAt;
  51.     }
  52.     public function setCreatedAt(?\DateTimeImmutable $createdAt): static
  53.     {
  54.         $this->createdAt $createdAt;
  55.         return $this;
  56.     }
  57.     
  58.      public function getCreatedBy(): ?string
  59.     {
  60.         return $this->created_by;
  61.     }
  62.     public function setCreatedBy(?string $created_by): static
  63.     {
  64.         $this->created_by $created_by;
  65.         return $this;
  66.     }
  67. }