mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-12 19:34:31 +02:00
Added internal part number field to parts
This commit is contained in:
parent
81abf36867
commit
b1d359f538
12 changed files with 123 additions and 3 deletions
|
@ -50,6 +50,14 @@ trait AdvancedPropertyTrait
|
|||
*/
|
||||
protected ?float $mass = null;
|
||||
|
||||
/**
|
||||
* @var string The internal part number of the part
|
||||
* @ORM\Column(type="string", length=100, nullable=true, unique=true)
|
||||
* @Assert\Length(max="100")
|
||||
*
|
||||
*/
|
||||
protected ?string $ipn = null;
|
||||
|
||||
/**
|
||||
* Checks if this part is marked, for that it needs further review.
|
||||
*/
|
||||
|
@ -117,4 +125,26 @@ trait AdvancedPropertyTrait
|
|||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the internal part number of the part.
|
||||
* @return string
|
||||
*/
|
||||
public function getIpn(): ?string
|
||||
{
|
||||
return $this->ipn;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the internal part number of the part
|
||||
* @param string $ipn The new IPN of the part
|
||||
* @return Part
|
||||
*/
|
||||
public function setIpn(?string $ipn): Part
|
||||
{
|
||||
$this->ipn = $ipn;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue