src/Entity/Inventory/WithdrawalItem.php line 13
<?php
namespace App\Entity\Inventory;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
#[ORM\Table(name: 'inventory_withdrawal_item')]
#[ORM\Index(columns: ['withdrawal_id'], name: 'inventory_withdrawal_item_withdrawal_id_idx')]
#[ORM\Index(columns: ['inventory_item_id'], name: 'inventory_withdrawal_item_inventory_item_id_idx')]
#[ORM\Entity]
class WithdrawalItem
{
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'IDENTITY')]
#[ORM\SequenceGenerator(sequenceName: 'inventory_withdrawal_item_id_seq')]
#[ORM\Column(type: Types::INTEGER)]
private ?int $id = null;
#[Assert\NotNull]
#[ORM\ManyToOne(targetEntity: Withdrawal::class, inversedBy: 'items')]
#[ORM\JoinColumn(name: 'withdrawal_id', nullable: false)]
private ?Withdrawal $withdrawal = null;
#[Assert\NotNull]
#[ORM\ManyToOne(targetEntity: InventoryItem::class, inversedBy: 'withdrawalItems')]
#[ORM\JoinColumn(name: 'inventory_item_id', nullable: false)]
private ?InventoryItem $inventoryItem = null;
#[Assert\Type(type: Types::INTEGER)]
#[ORM\Column(type: Types::INTEGER)]
private ?int $requestedQuantity = null;
#[Assert\Type(type: Types::INTEGER)]
#[ORM\Column(type: Types::INTEGER, nullable: true)]
private ?int $approvedQuantity = null;
#[Assert\Type(type: Types::INTEGER)]
#[ORM\Column(type: Types::INTEGER, nullable: true)]
private ?int $remittedQuantity = null;
public function getId(): ?int
{
return $this->id;
}
public function getRequestedQuantity(): ?int
{
return $this->requestedQuantity;
}
public function setRequestedQuantity(int $requestedQuantity): static
{
$this->requestedQuantity = $requestedQuantity;
return $this;
}
public function getApprovedQuantity(): ?int
{
return $this->approvedQuantity;
}
public function setApprovedQuantity(?int $approvedQuantity): static
{
$this->approvedQuantity = $approvedQuantity;
return $this;
}
public function getRemittedQuantity(): ?int
{
return $this->remittedQuantity;
}
public function setRemittedQuantity(?int $remittedQuantity): static
{
$this->remittedQuantity = $remittedQuantity;
return $this;
}
public function getWithdrawal(): ?Withdrawal
{
return $this->withdrawal;
}
public function setWithdrawal(?Withdrawal $withdrawal): static
{
$this->withdrawal = $withdrawal;
return $this;
}
public function getInventoryItem(): ?InventoryItem
{
return $this->inventoryItem;
}
public function setInventoryItem(?InventoryItem $inventoryItem): static
{
$this->inventoryItem = $inventoryItem;
return $this;
}
}