src/Entity/Statistics/StockStatistic.php line 21

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Statistics;
  3. use App\Entity\AbstractBase;
  4. use App\Entity\Garages\Garage;
  5. use App\Entity\Traits\GarageTrait;
  6. use App\Entity\User;
  7. use App\Repository\Statistics\StockStatisticRepository;
  8. use Doctrine\ORM\Mapping as ORM;
  9. use Gedmo\Mapping\Annotation as Gedmo;
  10. use Symfony\Component\Validator\Constraints as Assert;
  11. /**
  12.  * @ORM\Table(name="vulco_stock_statistic")
  13.  *
  14.  * @ORM\Entity(repositoryClass=StockStatisticRepository::class)
  15.  *
  16.  * @Gedmo\SoftDeleteable(fieldName="removedAt", timeAware=false)
  17.  */
  18. class StockStatistic extends AbstractBase
  19. {
  20.     use GarageTrait;
  21.     /**
  22.      * @ORM\Column(type="string", length=255, nullable=true)
  23.      */
  24.     private ?string $sapCode null;
  25.     /**
  26.      * @Assert\NotBlank()
  27.      *
  28.      * @ORM\Column(type="string", length=255, nullable=false)
  29.      */
  30.     private string $code;
  31.     /**
  32.      * @Assert\NotBlank()
  33.      *
  34.      * @ORM\Column(type="integer")
  35.      */
  36.     private int $quantity;
  37.     /**
  38.      * @Assert\NotBlank()
  39.      *
  40.      * @ORM\Column(type="string", length=255, nullable=false)
  41.      */
  42.     private string $brand;
  43.     /**
  44.      * @ORM\ManyToOne(targetEntity="App\Entity\Garages\Garage")
  45.      *
  46.      * @ORM\JoinColumn(name="garage_id", referencedColumnName="id")
  47.      */
  48.     private Garage $garage;
  49.     /**
  50.      * @ORM\ManyToOne(targetEntity="App\Entity\User")
  51.      *
  52.      * @ORM\JoinColumn(name="user_id", referencedColumnName="id")
  53.      */
  54.     private User $user;
  55.     /**
  56.      * @ORM\Column(type="datetime", nullable=false)
  57.      */
  58.     private \DateTimeInterface $importedOn;
  59.     public function getSapCode(): ?string
  60.     {
  61.         return $this->sapCode;
  62.     }
  63.     public function setSapCode(?string $sapCode): self
  64.     {
  65.         $this->sapCode $sapCode;
  66.         return $this;
  67.     }
  68.     public function getCode(): string
  69.     {
  70.         return $this->code;
  71.     }
  72.     public function setCode(string $code): self
  73.     {
  74.         $this->code $code;
  75.         return $this;
  76.     }
  77.     public function getQuantity(): int
  78.     {
  79.         return $this->quantity;
  80.     }
  81.     public function setQuantity(int $quantity): self
  82.     {
  83.         $this->quantity $quantity;
  84.         return $this;
  85.     }
  86.     public function getBrand(): string
  87.     {
  88.         return $this->brand;
  89.     }
  90.     public function setBrand(string $brand): self
  91.     {
  92.         $this->brand $brand;
  93.         return $this;
  94.     }
  95.     public function getUser(): User
  96.     {
  97.         return $this->user;
  98.     }
  99.     public function setUser(User $user): self
  100.     {
  101.         $this->user $user;
  102.         return $this;
  103.     }
  104.     public function getImportedOn(): \DateTimeInterface
  105.     {
  106.         return $this->importedOn;
  107.     }
  108.     public function setImportedOn(\DateTimeInterface $importedOn): self
  109.     {
  110.         $this->importedOn $importedOn;
  111.         return $this;
  112.     }
  113. }