Improved documentation of entity fields

This commit is contained in:
Jan Böhmer 2023-09-17 12:50:32 +02:00
parent 219fbe5fca
commit f01ec9dbe4
13 changed files with 30 additions and 27 deletions

View file

@ -89,21 +89,21 @@ class Orderdetail extends AbstractDBElement implements TimeStampableInterface, N
protected Collection $pricedetails;
/**
* @var string
* @var string The order number of the part at the supplier
*/
#[Groups(['extended', 'full', 'import', 'orderdetail:read', 'orderdetail:write'])]
#[ORM\Column(type: Types::STRING)]
protected string $supplierpartnr = '';
/**
* @var bool
* @var bool True if this part is obsolete/not available anymore at the supplier
*/
#[Groups(['extended', 'full', 'import', 'orderdetail:read', 'orderdetail:write'])]
#[ORM\Column(type: Types::BOOLEAN)]
protected bool $obsolete = false;
/**
* @var string
* @var string The URL to the product on the supplier's website
*/
#[Assert\Url]
#[Groups(['full', 'import', 'orderdetail:read', 'orderdetail:write'])]
@ -111,7 +111,7 @@ class Orderdetail extends AbstractDBElement implements TimeStampableInterface, N
protected string $supplier_product_url = '';
/**
* @var Part|null
* @var Part|null The part with which this orderdetail is associated
*/
#[Assert\NotNull]
#[ORM\ManyToOne(targetEntity: Part::class, inversedBy: 'orderdetails')]
@ -120,7 +120,7 @@ class Orderdetail extends AbstractDBElement implements TimeStampableInterface, N
protected ?Part $part = null;
/**
* @var Supplier|null
* @var Supplier|null The supplier of this orderdetail
*/
#[Assert\NotNull(message: 'validator.orderdetail.supplier_must_not_be_null')]
#[Groups(['extended', 'full', 'import', 'orderdetail:read', 'orderdetail:write'])]

View file

@ -90,7 +90,7 @@ class Pricedetail extends AbstractDBElement implements TimeStampableInterface
protected ?Currency $currency = null;
/**
* @var float
* @var float The amount/quantity for which the price is for (in part unit)
*/
#[Assert\Positive]
#[Groups(['extended', 'full', 'import', 'pricedetail:read', 'pricedetail:write'])]
@ -98,7 +98,7 @@ class Pricedetail extends AbstractDBElement implements TimeStampableInterface
protected float $price_related_quantity = 1.0;
/**
* @var float
* @var float The minimum amount/quantity, which is needed to get this discount (in part unit)
*/
#[Assert\Positive]
#[Groups(['extended', 'full', 'import', 'pricedetail:read', 'pricedetail:write'])]