mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 09:35:49 +02:00
Added data field for vendor PartLot barcodes
This commit is contained in:
parent
0447a7e6b3
commit
b7cfdebad5
1 changed files with 9 additions and 2 deletions
|
@ -60,8 +60,9 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface;
|
||||||
#[ORM\Entity]
|
#[ORM\Entity]
|
||||||
#[ORM\HasLifecycleCallbacks]
|
#[ORM\HasLifecycleCallbacks]
|
||||||
#[ORM\Table(name: 'part_lots')]
|
#[ORM\Table(name: 'part_lots')]
|
||||||
#[ORM\Index(name: 'part_lots_idx_instock_un_expiration_id_part', columns: ['instock_unknown', 'expiration_date', 'id_part'])]
|
#[ORM\Index(columns: ['instock_unknown', 'expiration_date', 'id_part'], name: 'part_lots_idx_instock_un_expiration_id_part')]
|
||||||
#[ORM\Index(name: 'part_lots_idx_needs_refill', columns: ['needs_refill'])]
|
#[ORM\Index(columns: ['needs_refill'], name: 'part_lots_idx_needs_refill')]
|
||||||
|
#[ORM\Index(columns: ['vendor_barcode'], name: 'part_lots_idx_barcode')]
|
||||||
#[ValidPartLot]
|
#[ValidPartLot]
|
||||||
#[ApiResource(
|
#[ApiResource(
|
||||||
operations: [
|
operations: [
|
||||||
|
@ -154,6 +155,12 @@ class PartLot extends AbstractDBElement implements TimeStampableInterface, Named
|
||||||
#[Groups(['part_lot:read', 'part_lot:write'])]
|
#[Groups(['part_lot:read', 'part_lot:write'])]
|
||||||
protected ?User $owner = null;
|
protected ?User $owner = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string|null The content of the barcode of this part lot (e.g. a barcode on the package put by the vendor)
|
||||||
|
*/
|
||||||
|
#[ORM\Column(type: Types::STRING, nullable: true)]
|
||||||
|
protected ?string $vendor_barcode = null;
|
||||||
|
|
||||||
public function __clone()
|
public function __clone()
|
||||||
{
|
{
|
||||||
if ($this->id) {
|
if ($this->id) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue