mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-27 13:29:32 +00:00
Improved serialized fields
This commit is contained in:
parent
b99e6c9a21
commit
2c67586873
18 changed files with 84 additions and 1 deletions
|
|
@ -26,6 +26,7 @@ use App\Entity\Parts\Manufacturer;
|
|||
use App\Entity\Parts\Part;
|
||||
use App\Validator\Constraints\Selectable;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Serializer\Annotation\Groups;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
/**
|
||||
|
|
@ -45,12 +46,14 @@ trait ManufacturerTrait
|
|||
* @var string the url to the part on the manufacturer's homepage
|
||||
* @ORM\Column(type="string")
|
||||
* @Assert\Url()
|
||||
* @Groups({"full"})
|
||||
*/
|
||||
protected string $manufacturer_product_url = '';
|
||||
|
||||
/**
|
||||
* @var string The product number used by the manufacturer. If this is set to "", the name field is used.
|
||||
* @ORM\Column(type="string")
|
||||
* @Groups({"extended", "full"})
|
||||
*/
|
||||
protected string $manufacturer_product_number = '';
|
||||
|
||||
|
|
@ -58,6 +61,7 @@ trait ManufacturerTrait
|
|||
* @var string The production status of this part. Can be one of the specified ones.
|
||||
* @ORM\Column(type="string", length=255, nullable=true)
|
||||
* @Assert\Choice({"announced", "active", "nrfnd", "eol", "discontinued", ""})
|
||||
* @Groups({"extended", "full"})
|
||||
*/
|
||||
protected ?string $manufacturing_status = '';
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue