src/Entity/Expedient/Log.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Expedient;
  3. use App\Entity\AppUser;
  4. use App\Entity\Shipping;
  5. use App\Repository\Expedient\LogRepository;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=LogRepository::class)
  9.  * @ORM\Table(name="shipping_log")
  10.  */
  11. class Log
  12. {
  13.     const OPERATION_CREATED 'created';
  14.     const OPERATION_UPDATED 'updated';
  15.     const OPERATION_CANCELLED 'cancelled';
  16.     const OPERATION_DISCOUNT 'discount';
  17.     const OPERATION_DISCOUNT_CANCEL 'discount_canceled';
  18.     /**
  19.      * @ORM\Id
  20.      * @ORM\GeneratedValue
  21.      * @ORM\Column(type="integer")
  22.      */
  23.     private $id;
  24.     /**
  25.      * @ORM\Column(type="datetime_immutable")
  26.      */
  27.     private $createdAt;
  28.     /**
  29.      * @ORM\ManyToOne(targetEntity=AppUser::class, inversedBy="logs")
  30.      * @ORM\JoinColumn(nullable=false)
  31.      */
  32.     private $generatedBy;
  33.     /**
  34.      * @ORM\Column(type="string", length=255)
  35.      */
  36.     private $operation;
  37.     /**
  38.      * @ORM\Column(type="text")
  39.      */
  40.     private $extraInfo;
  41.     /**
  42.      * @ORM\ManyToOne(targetEntity=Shipping::class, inversedBy="logs")
  43.      * @ORM\JoinColumn(nullable=false)
  44.      */
  45.     private $shipping;
  46.     /**
  47.      * @ORM\Column(type="float", nullable=true)
  48.      */
  49.     private $operationAmount;
  50.     /**
  51.      * @ORM\Column(type="boolean")
  52.      */
  53.     private $cancelledDiscount;
  54.     public function getId(): ?int
  55.     {
  56.         return $this->id;
  57.     }
  58.     public function getCreatedAt(): ?\DateTimeImmutable
  59.     {
  60.         return $this->createdAt;
  61.     }
  62.     public function setCreatedAt(\DateTimeImmutable $createdAt): self
  63.     {
  64.         $this->createdAt $createdAt;
  65.         return $this;
  66.     }
  67.     public function getGeneratedBy(): ?AppUser
  68.     {
  69.         return $this->generatedBy;
  70.     }
  71.     public function setGeneratedBy(?AppUser $generatedBy): self
  72.     {
  73.         $this->generatedBy $generatedBy;
  74.         return $this;
  75.     }
  76.     public function getOperation(): ?string
  77.     {
  78.         return $this->operation;
  79.     }
  80.     public function setOperation(string $operation): self
  81.     {
  82.         $this->operation $operation;
  83.         return $this;
  84.     }
  85.     public function getExtraInfo(): ?string
  86.     {
  87.         return $this->extraInfo;
  88.     }
  89.     public function setExtraInfo(string $extraInfo): self
  90.     {
  91.         $this->extraInfo $extraInfo;
  92.         return $this;
  93.     }
  94.     public function getShipping(): ?Shipping
  95.     {
  96.         return $this->shipping;
  97.     }
  98.     public function setShipping(?Shipping $shipping): self
  99.     {
  100.         $this->shipping $shipping;
  101.         return $this;
  102.     }
  103.     public function getOperationAmount(): ?float
  104.     {
  105.         return $this->operationAmount;
  106.     }
  107.     public function setOperationAmount(?float $operationAmount): self
  108.     {
  109.         $this->operationAmount $operationAmount;
  110.         return $this;
  111.     }
  112.     public function isCancelledDiscount(): ?bool
  113.     {
  114.         return $this->cancelledDiscount;
  115.     }
  116.     public function setCancelledDiscount(bool $cancelledDiscount): self
  117.     {
  118.         $this->cancelledDiscount $cancelledDiscount;
  119.         return $this;
  120.     }
  121. }