src/Entity/Statistics/SaleStatistic.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\SaleStatisticRepository;
  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_sale_statistic")
  13.  *
  14.  * @ORM\Entity(repositoryClass=SaleStatisticRepository::class)
  15.  *
  16.  * @Gedmo\SoftDeleteable(fieldName="removedAt", timeAware=false)
  17.  */
  18. class SaleStatistic extends AbstractBase
  19. {
  20.     use GarageTrait;
  21.     /**
  22.      * @ORM\ManyToOne(targetEntity="App\Entity\Garages\Garage")
  23.      */
  24.     private Garage $garage;
  25.     /**
  26.      * @ORM\ManyToOne(targetEntity="App\Entity\User")
  27.      */
  28.     private User $user;
  29.     /**
  30.      * @ORM\Column(type="datetime", nullable=false)
  31.      */
  32.     private \DateTimeInterface $importedOn;
  33.     /**
  34.      * @ORM\Column(type="string", nullable=true)
  35.      */
  36.     private ?string $sapCode;
  37.     /**
  38.      * @Assert\NotBlank()
  39.      *
  40.      * @ORM\Column(type="string")
  41.      */
  42.     private string $code;
  43.     /**
  44.      * @Assert\NotBlank()
  45.      *
  46.      * @ORM\Column(type="integer")
  47.      */
  48.     private int $quantity;
  49.     /**
  50.      * @Assert\NotBlank()
  51.      *
  52.      * @ORM\Column(type="float", precision=10, scale=2)
  53.      */
  54.     private float $price;
  55.     /**
  56.      * @Assert\NotBlank()
  57.      *
  58.      * @ORM\Column(type="string")
  59.      */
  60.     private string $zipCode;
  61.     /**
  62.      * @Assert\NotBlank()
  63.      *
  64.      * @ORM\Column(type="string")
  65.      */
  66.     private string $brand;
  67.     public function getUser(): User
  68.     {
  69.         return $this->user;
  70.     }
  71.     public function setUser(User $user): self
  72.     {
  73.         $this->user $user;
  74.         return $this;
  75.     }
  76.     public function getImportedOn(): \DateTimeInterface
  77.     {
  78.         return $this->importedOn;
  79.     }
  80.     public function setImportedOn(\DateTimeInterface $importedOn): self
  81.     {
  82.         $this->importedOn $importedOn;
  83.         return $this;
  84.     }
  85.     public function getSapCode(): ?string
  86.     {
  87.         return $this->sapCode;
  88.     }
  89.     public function setSapCode(?string $sapCode): self
  90.     {
  91.         $this->sapCode $sapCode;
  92.         return $this;
  93.     }
  94.     public function getCode(): string
  95.     {
  96.         return $this->code;
  97.     }
  98.     public function setCode(string $code): self
  99.     {
  100.         $this->code $code;
  101.         return $this;
  102.     }
  103.     public function getQuantity(): int
  104.     {
  105.         return $this->quantity;
  106.     }
  107.     public function setQuantity(int $quantity): self
  108.     {
  109.         $this->quantity $quantity;
  110.         return $this;
  111.     }
  112.     public function getPrice(): float
  113.     {
  114.         return $this->price;
  115.     }
  116.     public function setPrice(float $price): self
  117.     {
  118.         $this->price $price;
  119.         return $this;
  120.     }
  121.     public function getZipCode(): string
  122.     {
  123.         return $this->zipCode;
  124.     }
  125.     public function setZipCode(string $zipCode): self
  126.     {
  127.         $this->zipCode $zipCode;
  128.         return $this;
  129.     }
  130.     public function getBrand(): string
  131.     {
  132.         return $this->brand;
  133.     }
  134.     public function setBrand(string $brand): self
  135.     {
  136.         $this->brand $brand;
  137.         return $this;
  138.     }
  139. }