mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-21 02:19:30 +00:00
Improved serialized fields
This commit is contained in:
parent
b99e6c9a21
commit
2c67586873
18 changed files with 84 additions and 1 deletions
|
|
@ -34,6 +34,7 @@ use Doctrine\Common\Collections\ArrayCollection;
|
|||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
||||
use Symfony\Component\Serializer\Annotation\Groups;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
/**
|
||||
|
|
@ -54,12 +55,14 @@ class Orderdetail extends AbstractDBElement implements TimeStampableInterface, N
|
|||
* @ORM\OneToMany(targetEntity="Pricedetail", mappedBy="orderdetail", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
* @Assert\Valid()
|
||||
* @ORM\OrderBy({"min_discount_quantity" = "ASC"})
|
||||
* @Groups({"extended", "full"})
|
||||
*/
|
||||
protected $pricedetails;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @ORM\Column(type="string")
|
||||
* @Groups({"extended", "full"})
|
||||
*/
|
||||
protected string $supplierpartnr = '';
|
||||
|
||||
|
|
@ -73,6 +76,7 @@ class Orderdetail extends AbstractDBElement implements TimeStampableInterface, N
|
|||
* @var string
|
||||
* @ORM\Column(type="string")
|
||||
* @Assert\Url()
|
||||
* @Groups({"full"})
|
||||
*/
|
||||
protected string $supplier_product_url = '';
|
||||
|
||||
|
|
@ -89,6 +93,7 @@ class Orderdetail extends AbstractDBElement implements TimeStampableInterface, N
|
|||
* @ORM\ManyToOne(targetEntity="App\Entity\Parts\Supplier", inversedBy="orderdetails")
|
||||
* @ORM\JoinColumn(name="id_supplier", referencedColumnName="id")
|
||||
* @Assert\NotNull(message="validator.orderdetail.supplier_must_not_be_null")
|
||||
* @Groups({"extended", "full"})
|
||||
*/
|
||||
protected ?Supplier $supplier = null;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue