<?php
namespace App\Entity;
use ApiPlatform\Metadata\ApiResource;
use App\Repository\IncomingInvoiceProductRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
#[ORM\Entity(repositoryClass: IncomingInvoiceProductRepository::class)]
#[ApiResource(
normalizationContext: ['groups' => ['incoming_invoice:read']],
denormalizationContext: ['groups' => ['incoming_invoice:write']],
order: ['id' => 'DESC'],
)]
class IncomingInvoiceProduct
{
#[Groups(['incoming_invoice:read', 'incoming_invoice:write'])]
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[Groups(['incoming_invoice:read', 'incoming_invoice:write'])]
#[ORM\Column(length: 255, nullable: true)]
private ?string $name = null;
#[Groups(['incoming_invoice:read', 'incoming_invoice:write'])]
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $dateEntered = null;
#[Groups(['incoming_invoice:read', 'incoming_invoice:write'])]
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $dateModified = null;
#[Groups(['incoming_invoice:read', 'incoming_invoice:write'])]
#[ORM\ManyToOne]
private ?User $created_by = null;
#[Groups(['incoming_invoice:read', 'incoming_invoice:write'])]
#[ORM\ManyToOne]
private ?User $modified_user = null;
#[Groups(['incoming_invoice:read', 'incoming_invoice:write'])]
#[ORM\Column(length: 100, nullable: true)]
private ?string $status = null;
#[Groups(['incoming_invoice:read', 'incoming_invoice:write'])]
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $description = null;
#[Groups(['incoming_invoice:read', 'incoming_invoice:write'])]
#[ORM\ManyToOne(inversedBy: 'incomingInvoiceProducts')]
private ?IncomingInvoice $incomingInvoice = null;
#[Groups(['incoming_invoice:read', 'incoming_invoice:write'])]
#[ORM\ManyToOne(inversedBy: 'incomingInvoiceProducts')]
private ?Products $product = null;
#[Groups(['incoming_invoice:read', 'incoming_invoice:write'])]
#[ORM\ManyToOne]
private ?MeasurmentUnit $measurementUnit = null;
#[Groups(['incoming_invoice:read', 'incoming_invoice:write'])]
#[ORM\Column(nullable: true)]
private ?float $count = null;
#[Groups(['incoming_invoice:read', 'incoming_invoice:write'])]
#[ORM\Column(nullable: true)]
private ?float $placedCount = null;
#[Groups(['incoming_invoice:read', 'incoming_invoice:write'])]
#[ORM\Column(nullable: true)]
private ?bool $isPlaced = null;
#[Groups(['incoming_invoice:read', 'incoming_invoice:write'])]
#[ORM\Column(nullable: true)]
private ?float $priceForOne = null;
#[Groups(['incoming_invoice:read', 'incoming_invoice:write'])]
#[ORM\Column(type: Types::DATE_MUTABLE, nullable: true)]
private ?\DateTimeInterface $expirationDate = null;
#[Groups(['incoming_invoice:read', 'incoming_invoice:write'])]
#[ORM\Column(nullable: true)]
private ?float $weightNettoForOne = null;
#[Groups(['incoming_invoice:read', 'incoming_invoice:write'])]
#[ORM\Column(length: 20, nullable: true)]
private ?string $iddoc = null;
#[Groups(['incoming_invoice:read', 'incoming_invoice:write'])]
#[ORM\Column(nullable: true)]
private ?float $priceIncome = null;
#[Groups(['incoming_invoice:read', 'incoming_invoice:write'])]
#[ORM\Column(nullable: true)]
private ?float $priceSell = null;
#[Groups(['incoming_invoice:read', 'incoming_invoice:write'])]
#[ORM\ManyToOne(inversedBy: 'incomingInvoiceProducts')]
private ?Storage $storage = null;
#[Groups(['incoming_invoice:read', 'incoming_invoice:write'])]
#[ORM\Column(length: 20, nullable: true)]
private ?string $code_1c = null;
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(?string $name): self
{
$this->name = $name;
return $this;
}
public function getDateEntered(): ?\DateTimeInterface
{
return $this->dateEntered;
}
public function setDateEntered(?\DateTimeInterface $dateEntered): self
{
$this->dateEntered = $dateEntered;
return $this;
}
public function getDateModified(): ?\DateTimeInterface
{
return $this->dateModified;
}
public function setDateModified(?\DateTimeInterface $dateModified): self
{
$this->dateModified = $dateModified;
return $this;
}
public function getCreatedBy(): ?User
{
return $this->created_by;
}
public function setCreatedBy(?User $created_by): self
{
$this->created_by = $created_by;
return $this;
}
public function getModifiedUser(): ?User
{
return $this->modified_user;
}
public function setModifiedUser(?User $modified_user_id): self
{
$this->modified_user = $modified_user_id;
return $this;
}
public function getStatus(): ?string
{
return $this->status;
}
public function setStatus(?string $status): self
{
$this->status = $status;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): self
{
$this->description = $description;
return $this;
}
public function getIncomingInvoice(): ?IncomingInvoice
{
return $this->incomingInvoice;
}
public function setIncomingInvoice(?IncomingInvoice $incomingInvoice): self
{
$this->incomingInvoice = $incomingInvoice;
return $this;
}
public function getProduct(): ?Products
{
return $this->product;
}
public function setProduct(?Products $product): self
{
$this->product = $product;
return $this;
}
public function getMeasurementUnit(): ?MeasurmentUnit
{
return $this->measurementUnit;
}
public function setMeasurementUnit(?MeasurmentUnit $measurementUnit): self
{
$this->measurementUnit = $measurementUnit;
return $this;
}
public function getCount(): ?float
{
return $this->count;
}
public function setCount(?float $count): self
{
$this->count = $count;
return $this;
}
public function getPlacedCount(): ?float
{
return $this->placedCount;
}
public function setPlacedCount(?float $placedCount): self
{
$this->placedCount = $placedCount;
return $this;
}
public function isIsPlaced(): ?bool
{
return $this->isPlaced;
}
public function setIsPlaced(?bool $isPlaced): self
{
$this->isPlaced = $isPlaced;
return $this;
}
public function getPriceForOne(): ?float
{
return $this->priceForOne;
}
public function setPriceForOne(?float $priceForOne): self
{
$this->priceForOne = $priceForOne;
return $this;
}
public function getExpirationDate(): ?\DateTimeInterface
{
return $this->expirationDate;
}
public function setExpirationDate(?\DateTimeInterface $expirationDate): self
{
$this->expirationDate = $expirationDate;
return $this;
}
public function getWeightNettoForOne(): ?float
{
return $this->weightNettoForOne;
}
public function setWeightNettoForOne(?float $weightNettoForOne): self
{
$this->weightNettoForOne = $weightNettoForOne;
return $this;
}
public function getIddoc(): ?string
{
return $this->iddoc;
}
public function setIddoc(?string $iddoc): self
{
$this->iddoc = $iddoc;
return $this;
}
public function getPriceIncome(): ?float
{
return $this->priceIncome;
}
public function setPriceIncome(?float $priceIncome): self
{
$this->priceIncome = $priceIncome;
return $this;
}
public function getPriceSell(): ?float
{
return $this->priceSell;
}
public function setPriceSell(?float $priceSell): self
{
$this->priceSell = $priceSell;
return $this;
}
public function getStorage(): ?Storage
{
return $this->storage;
}
public function setStorage(?Storage $storage): self
{
$this->storage = $storage;
return $this;
}
public function getCode1c(): ?string
{
return $this->code_1c;
}
public function setCode1c(?string $code_1c): self
{
$this->code_1c = $code_1c;
return $this;
}
}