Merge branch 'master' into permission_rework

This commit is contained in:
Jan Böhmer 2022-10-30 17:35:57 +01:00
commit 33f8d2ba9e
109 changed files with 5095 additions and 2860 deletions

View file

@ -33,7 +33,10 @@ use Symfony\Component\Validator\Constraints as Assert;
* Class AttachmentType.
*
* @ORM\Entity(repositoryClass="App\Repository\Parts\CategoryRepository")
* @ORM\Table(name="`categories`")
* @ORM\Table(name="`categories`", indexes={
* @ORM\Index(name="category_idx_name", columns={"name"}),
* @ORM\Index(name="category_idx_parent_name", columns={"parent_id", "name"}),
* })
*/
class Category extends AbstractPartsContainingDBElement
{

View file

@ -61,7 +61,10 @@ use Symfony\Component\Validator\Constraints as Assert;
* Class Footprint.
*
* @ORM\Entity(repositoryClass="App\Repository\Parts\FootprintRepository")
* @ORM\Table("`footprints`")
* @ORM\Table("`footprints`", indexes={
* @ORM\Index(name="footprint_idx_name", columns={"name"}),
* @ORM\Index(name="footprint_idx_parent_name", columns={"parent_id", "name"}),
* })
*/
class Footprint extends AbstractPartsContainingDBElement
{

View file

@ -61,7 +61,10 @@ use Symfony\Component\Validator\Constraints as Assert;
* Class Manufacturer.
*
* @ORM\Entity(repositoryClass="App\Repository\Parts\ManufacturerRepository")
* @ORM\Table("`manufacturers`")
* @ORM\Table("`manufacturers`", indexes={
* @ORM\Index(name="manufacturer_name", columns={"name"}),
* @ORM\Index(name="manufacturer_idx_parent_name", columns={"parent_id", "name"}),
* })
*/
class Manufacturer extends AbstractCompany
{

View file

@ -55,7 +55,10 @@ use Symfony\Component\Validator\Constraints as Assert;
* This could be something like N, grams, meters, etc...
*
* @ORM\Entity(repositoryClass="App\Repository\Parts\MeasurementUnitRepository")
* @ORM\Table(name="`measurement_units`")
* @ORM\Table(name="`measurement_units`", indexes={
* @ORM\Index(name="unit_idx_name", columns={"name"}),
* @ORM\Index(name="unit_idx_parent_name", columns={"parent_id", "name"}),
* })
* @UniqueEntity("unit")
*/
class MeasurementUnit extends AbstractPartsContainingDBElement
@ -66,7 +69,7 @@ class MeasurementUnit extends AbstractPartsContainingDBElement
* @ORM\Column(type="string", name="unit", nullable=true)
* @Assert\Length(max=10)
*/
protected string $unit;
protected ?string $unit = null;
/**
* @var bool Determines if the amount value associated with this unit should be treated as integer.

View file

@ -74,7 +74,10 @@ use Symfony\Component\Validator\Constraints as Assert;
* Otherwise this class would be too big, to be maintained.
*
* @ORM\Entity(repositoryClass="App\Repository\PartRepository")
* @ORM\Table("`parts`")
* @ORM\Table("`parts`", indexes={
* @ORM\Index(name="parts_idx_datet_name_last_id_needs", columns={"datetime_added", "name", "last_modified", "id", "needs_review"}),
* @ORM\Index(name="parts_idx_name", columns={"name"}),
* })
*/
class Part extends AttachmentContainingDBElement
{

View file

@ -58,7 +58,10 @@ use Symfony\Component\Validator\Constraints as Assert;
* It is the connection between a part and its store locations.
*
* @ORM\Entity()
* @ORM\Table(name="part_lots")
* @ORM\Table(name="part_lots", indexes={
* @ORM\Index(name="part_lots_idx_instock_un_expiration_id_part", columns={"instock_unknown", "expiration_date", "id_part"}),
* @ORM\Index(name="part_lots_idx_needs_refill", columns={"needs_refill"}),
* })
* @ORM\HasLifecycleCallbacks()
* @ValidPartLot()
*/

View file

@ -79,7 +79,7 @@ trait ManufacturerTrait
* @ORM\Column(type="string", length=255, nullable=true)
* @Assert\Choice({"announced", "active", "nrfnd", "eol", "discontinued", ""})
*/
protected string $manufacturing_status = '';
protected ?string $manufacturing_status = '';
/**
* Get the link to the website of the article on the manufacturers website

View file

@ -79,7 +79,7 @@ trait OrderTrait
* @ORM\OneToOne(targetEntity="App\Entity\PriceInformations\Orderdetail")
* @ORM\JoinColumn(name="order_orderdetails_id", referencedColumnName="id")
*/
protected Orderdetail $order_orderdetail;
protected ?Orderdetail $order_orderdetail = null;
/**
* Get the selected order orderdetails of this part.

View file

@ -61,7 +61,10 @@ use Symfony\Component\Validator\Constraints as Assert;
* Class Store location.
*
* @ORM\Entity(repositoryClass="App\Repository\Parts\StorelocationRepository")
* @ORM\Table("`storelocations`")
* @ORM\Table("`storelocations`", indexes={
* @ORM\Index(name="location_idx_name", columns={"name"}),
* @ORM\Index(name="location_idx_parent_name", columns={"parent_id", "name"}),
* })
*/
class Storelocation extends AbstractPartsContainingDBElement
{

View file

@ -65,7 +65,10 @@ use Symfony\Component\Validator\Constraints as Assert;
* Class Supplier.
*
* @ORM\Entity(repositoryClass="App\Repository\Parts\SupplierRepository")
* @ORM\Table("`suppliers`")
* @ORM\Table("`suppliers`", indexes={
* @ORM\Index(name="supplier_idx_name", columns={"name"}),
* @ORM\Index(name="supplier_idx_parent_name", columns={"parent_id", "name"}),
* })
*/
class Supplier extends AbstractCompany
{