src/Entity/IncomingInvoiceProduct.php line 18

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use ApiPlatform\Metadata\ApiResource;
  4. use App\Repository\IncomingInvoiceProductRepository;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Component\Serializer\Annotation\Groups;
  8. #[ORM\Entity(repositoryClassIncomingInvoiceProductRepository::class)]
  9. #[ApiResource(
  10.     normalizationContext: ['groups' => ['incoming_invoice:read']],
  11.     denormalizationContext: ['groups' => ['incoming_invoice:write']],
  12.     order: ['id' => 'DESC'],
  13. )]
  14. class IncomingInvoiceProduct
  15. {
  16.     #[Groups(['incoming_invoice:read''incoming_invoice:write'])]
  17.     #[ORM\Id]
  18.     #[ORM\GeneratedValue]
  19.     #[ORM\Column]
  20.     private ?int $id null;
  21.     #[Groups(['incoming_invoice:read''incoming_invoice:write'])]
  22.     #[ORM\Column(length255nullabletrue)]
  23.     private ?string $name null;
  24.     #[Groups(['incoming_invoice:read''incoming_invoice:write'])]
  25.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  26.     private ?\DateTimeInterface $dateEntered null;
  27.     #[Groups(['incoming_invoice:read''incoming_invoice:write'])]
  28.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  29.     private ?\DateTimeInterface $dateModified null;
  30.     #[Groups(['incoming_invoice:read''incoming_invoice:write'])]
  31.     #[ORM\ManyToOne]
  32.     private ?User $created_by null;
  33.     #[Groups(['incoming_invoice:read''incoming_invoice:write'])]
  34.     #[ORM\ManyToOne]
  35.     private ?User $modified_user null;
  36.     #[Groups(['incoming_invoice:read''incoming_invoice:write'])]
  37.     #[ORM\Column(length100nullabletrue)]
  38.     private ?string $status null;
  39.     #[Groups(['incoming_invoice:read''incoming_invoice:write'])]
  40.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  41.     private ?string $description null;
  42.     #[Groups(['incoming_invoice:read''incoming_invoice:write'])]
  43.     #[ORM\ManyToOne(inversedBy'incomingInvoiceProducts')]
  44.     private ?IncomingInvoice $incomingInvoice null;
  45.     #[Groups(['incoming_invoice:read''incoming_invoice:write'])]
  46.     #[ORM\ManyToOne(inversedBy'incomingInvoiceProducts')]
  47.     private ?Products $product null;
  48.     #[Groups(['incoming_invoice:read''incoming_invoice:write'])]
  49.     #[ORM\ManyToOne]
  50.     private ?MeasurmentUnit $measurementUnit null;
  51.     #[Groups(['incoming_invoice:read''incoming_invoice:write'])]
  52.     #[ORM\Column(nullabletrue)]
  53.     private ?float $count null;
  54.     #[Groups(['incoming_invoice:read''incoming_invoice:write'])]
  55.     #[ORM\Column(nullabletrue)]
  56.     private ?float $placedCount null;
  57.     #[Groups(['incoming_invoice:read''incoming_invoice:write'])]
  58.     #[ORM\Column(nullabletrue)]
  59.     private ?bool $isPlaced null;
  60.     #[Groups(['incoming_invoice:read''incoming_invoice:write'])]
  61.     #[ORM\Column(nullabletrue)]
  62.     private ?float $priceForOne null;
  63.     #[Groups(['incoming_invoice:read''incoming_invoice:write'])]
  64.     #[ORM\Column(typeTypes::DATE_MUTABLEnullabletrue)]
  65.     private ?\DateTimeInterface $expirationDate null;
  66.     #[Groups(['incoming_invoice:read''incoming_invoice:write'])]
  67.     #[ORM\Column(nullabletrue)]
  68.     private ?float $weightNettoForOne null;
  69.     #[Groups(['incoming_invoice:read''incoming_invoice:write'])]
  70.     #[ORM\Column(length20nullabletrue)]
  71.     private ?string $iddoc null;
  72.     #[Groups(['incoming_invoice:read''incoming_invoice:write'])]
  73.     #[ORM\Column(nullabletrue)]
  74.     private ?float $priceIncome null;
  75.     #[Groups(['incoming_invoice:read''incoming_invoice:write'])]
  76.     #[ORM\Column(nullabletrue)]
  77.     private ?float $priceSell null;
  78.     #[Groups(['incoming_invoice:read''incoming_invoice:write'])]
  79.     #[ORM\ManyToOne(inversedBy'incomingInvoiceProducts')]
  80.     private ?Storage $storage null;
  81.     #[Groups(['incoming_invoice:read''incoming_invoice:write'])]
  82.     #[ORM\Column(length20nullabletrue)]
  83.     private ?string $code_1c null;
  84.     public function getId(): ?int
  85.     {
  86.         return $this->id;
  87.     }
  88.     public function getName(): ?string
  89.     {
  90.         return $this->name;
  91.     }
  92.     public function setName(?string $name): self
  93.     {
  94.         $this->name $name;
  95.         return $this;
  96.     }
  97.     public function getDateEntered(): ?\DateTimeInterface
  98.     {
  99.         return $this->dateEntered;
  100.     }
  101.     public function setDateEntered(?\DateTimeInterface $dateEntered): self
  102.     {
  103.         $this->dateEntered $dateEntered;
  104.         return $this;
  105.     }
  106.     public function getDateModified(): ?\DateTimeInterface
  107.     {
  108.         return $this->dateModified;
  109.     }
  110.     public function setDateModified(?\DateTimeInterface $dateModified): self
  111.     {
  112.         $this->dateModified $dateModified;
  113.         return $this;
  114.     }
  115.     public function getCreatedBy(): ?User
  116.     {
  117.         return $this->created_by;
  118.     }
  119.     public function setCreatedBy(?User $created_by): self
  120.     {
  121.         $this->created_by $created_by;
  122.         return $this;
  123.     }
  124.     public function getModifiedUser(): ?User
  125.     {
  126.         return $this->modified_user;
  127.     }
  128.     public function setModifiedUser(?User $modified_user_id): self
  129.     {
  130.         $this->modified_user $modified_user_id;
  131.         return $this;
  132.     }
  133.     public function getStatus(): ?string
  134.     {
  135.         return $this->status;
  136.     }
  137.     public function setStatus(?string $status): self
  138.     {
  139.         $this->status $status;
  140.         return $this;
  141.     }
  142.     public function getDescription(): ?string
  143.     {
  144.         return $this->description;
  145.     }
  146.     public function setDescription(?string $description): self
  147.     {
  148.         $this->description $description;
  149.         return $this;
  150.     }
  151.     public function getIncomingInvoice(): ?IncomingInvoice
  152.     {
  153.         return $this->incomingInvoice;
  154.     }
  155.     public function setIncomingInvoice(?IncomingInvoice $incomingInvoice): self
  156.     {
  157.         $this->incomingInvoice $incomingInvoice;
  158.         return $this;
  159.     }
  160.     public function getProduct(): ?Products
  161.     {
  162.         return $this->product;
  163.     }
  164.     public function setProduct(?Products $product): self
  165.     {
  166.         $this->product $product;
  167.         return $this;
  168.     }
  169.     public function getMeasurementUnit(): ?MeasurmentUnit
  170.     {
  171.         return $this->measurementUnit;
  172.     }
  173.     public function setMeasurementUnit(?MeasurmentUnit $measurementUnit): self
  174.     {
  175.         $this->measurementUnit $measurementUnit;
  176.         return $this;
  177.     }
  178.     public function getCount(): ?float
  179.     {
  180.         return $this->count;
  181.     }
  182.     public function setCount(?float $count): self
  183.     {
  184.         $this->count $count;
  185.         return $this;
  186.     }
  187.     public function getPlacedCount(): ?float
  188.     {
  189.         return $this->placedCount;
  190.     }
  191.     public function setPlacedCount(?float $placedCount): self
  192.     {
  193.         $this->placedCount $placedCount;
  194.         return $this;
  195.     }
  196.     public function isIsPlaced(): ?bool
  197.     {
  198.         return $this->isPlaced;
  199.     }
  200.     public function setIsPlaced(?bool $isPlaced): self
  201.     {
  202.         $this->isPlaced $isPlaced;
  203.         return $this;
  204.     }
  205.     public function getPriceForOne(): ?float
  206.     {
  207.         return $this->priceForOne;
  208.     }
  209.     public function setPriceForOne(?float $priceForOne): self
  210.     {
  211.         $this->priceForOne $priceForOne;
  212.         return $this;
  213.     }
  214.     public function getExpirationDate(): ?\DateTimeInterface
  215.     {
  216.         return $this->expirationDate;
  217.     }
  218.     public function setExpirationDate(?\DateTimeInterface $expirationDate): self
  219.     {
  220.         $this->expirationDate $expirationDate;
  221.         return $this;
  222.     }
  223.     public function getWeightNettoForOne(): ?float
  224.     {
  225.         return $this->weightNettoForOne;
  226.     }
  227.     public function setWeightNettoForOne(?float $weightNettoForOne): self
  228.     {
  229.         $this->weightNettoForOne $weightNettoForOne;
  230.         return $this;
  231.     }
  232.     public function getIddoc(): ?string
  233.     {
  234.         return $this->iddoc;
  235.     }
  236.     public function setIddoc(?string $iddoc): self
  237.     {
  238.         $this->iddoc $iddoc;
  239.         return $this;
  240.     }
  241.     public function getPriceIncome(): ?float
  242.     {
  243.         return $this->priceIncome;
  244.     }
  245.     public function setPriceIncome(?float $priceIncome): self
  246.     {
  247.         $this->priceIncome $priceIncome;
  248.         return $this;
  249.     }
  250.     public function getPriceSell(): ?float
  251.     {
  252.         return $this->priceSell;
  253.     }
  254.     public function setPriceSell(?float $priceSell): self
  255.     {
  256.         $this->priceSell $priceSell;
  257.         return $this;
  258.     }
  259.     public function getStorage(): ?Storage
  260.     {
  261.         return $this->storage;
  262.     }
  263.     public function setStorage(?Storage $storage): self
  264.     {
  265.         $this->storage $storage;
  266.         return $this;
  267.     }
  268.     public function getCode1c(): ?string
  269.     {
  270.         return $this->code_1c;
  271.     }
  272.     public function setCode1c(?string $code_1c): self
  273.     {
  274.         $this->code_1c $code_1c;
  275.         return $this;
  276.     }
  277. }