Make more fiields importable

This commit is contained in:
Jan Böhmer 2023-03-13 00:52:22 +01:00
parent 4437f206af
commit 820be46ed3
10 changed files with 35 additions and 29 deletions

View file

@ -61,7 +61,7 @@ class Currency extends AbstractStructuralDBElement
* @var string the 3-letter ISO code of the currency
* @ORM\Column(type="string")
* @Assert\Currency()
* @Groups({"extended", "full"})
* @Groups({"extended", "full", "import"})
*/
protected string $iso_code = "";

View file

@ -55,20 +55,21 @@ 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"})
* @Groups({"extended", "full", "import"})
*/
protected $pricedetails;
/**
* @var string
* @ORM\Column(type="string")
* @Groups({"extended", "full"})
* @Groups({"extended", "full", "import"})
*/
protected string $supplierpartnr = '';
/**
* @var bool
* @ORM\Column(type="boolean")
* @Groups({"extended", "full", "import"})
*/
protected bool $obsolete = false;
@ -76,7 +77,7 @@ class Orderdetail extends AbstractDBElement implements TimeStampableInterface, N
* @var string
* @ORM\Column(type="string")
* @Assert\Url()
* @Groups({"full"})
* @Groups({"full", "import"})
*/
protected string $supplier_product_url = '';
@ -93,7 +94,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"})
* @Groups({"extended", "full", "import"})
*/
protected ?Supplier $supplier = null;

View file

@ -66,7 +66,7 @@ class Pricedetail extends AbstractDBElement implements TimeStampableInterface
* @ORM\ManyToOne(targetEntity="Currency", inversedBy="pricedetails")
* @ORM\JoinColumn(name="id_currency", referencedColumnName="id", nullable=true)
* @Selectable()
* @Groups({"extended", "full"})
* @Groups({"extended", "full", "import"})
*/
protected ?Currency $currency = null;
@ -74,7 +74,7 @@ class Pricedetail extends AbstractDBElement implements TimeStampableInterface
* @var float
* @ORM\Column(type="float")
* @Assert\Positive()
* @Groups({"extended", "full"})
* @Groups({"extended", "full", "import"})
*/
protected float $price_related_quantity = 1.0;
@ -82,7 +82,7 @@ class Pricedetail extends AbstractDBElement implements TimeStampableInterface
* @var float
* @ORM\Column(type="float")
* @Assert\Positive()
* @Groups({"extended", "full"})
* @Groups({"extended", "full", "import"})
*/
protected float $min_discount_quantity = 1.0;