mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-23 18:28:49 +02:00
Order attachments and part lots by a reasonable parameter.
This commit is contained in:
parent
f0a3e9b5af
commit
a4802e290f
14 changed files with 15 additions and 0 deletions
|
@ -58,6 +58,7 @@ class AttachmentType extends AbstractStructuralDBElement
|
|||
/**
|
||||
* @var Collection<int, AttachmentTypeAttachment>
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\Attachments\AttachmentTypeAttachment", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
* @ORM\OrderBy({"attachment_type" = "ASC", "name" = "ASC"})
|
||||
* @Assert\Valid()
|
||||
*/
|
||||
protected $attachments;
|
||||
|
|
|
@ -95,6 +95,7 @@ class Device extends AbstractPartsContainingDBElement
|
|||
/**
|
||||
* @var Collection<int, DeviceAttachment>
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\Attachments\DeviceAttachment", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
* @ORM\OrderBy({"attachment_type" = "ASC", "name" = "ASC"})
|
||||
*/
|
||||
protected $attachments;
|
||||
|
||||
|
|
|
@ -103,6 +103,7 @@ class Category extends AbstractPartsContainingDBElement
|
|||
/**
|
||||
* @var Collection<int, CategoryAttachment>
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\Attachments\CategoryAttachment", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
* @ORM\OrderBy({"attachment_type" = "ASC", "name" = "ASC"})
|
||||
* @Assert\Valid()
|
||||
*/
|
||||
protected $attachments;
|
||||
|
|
|
@ -83,6 +83,7 @@ class Footprint extends AbstractPartsContainingDBElement
|
|||
/**
|
||||
* @var Collection<int, FootprintAttachment>
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\Attachments\FootprintAttachment", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
* @ORM\OrderBy({"attachment_type" = "ASC", "name" = "ASC"})
|
||||
* @Assert\Valid()
|
||||
*/
|
||||
protected $attachments;
|
||||
|
|
|
@ -83,6 +83,7 @@ class Manufacturer extends AbstractCompany
|
|||
/**
|
||||
* @var Collection<int, ManufacturerAttachment>
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\Attachments\ManufacturerAttachment", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
* @ORM\OrderBy({"attachment_type" = "ASC", "name" = "ASC"})
|
||||
* @Assert\Valid()
|
||||
*/
|
||||
protected $attachments;
|
||||
|
|
|
@ -100,6 +100,7 @@ class MeasurementUnit extends AbstractPartsContainingDBElement
|
|||
/**
|
||||
* @var Collection<int, MeasurementUnitAttachment>
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\Attachments\MeasurementUnitAttachment", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
* @ORM\OrderBy({"attachment_type" = "ASC", "name" = "ASC"})
|
||||
* @Assert\Valid()
|
||||
*/
|
||||
protected $attachments;
|
||||
|
|
|
@ -121,6 +121,7 @@ class Part extends AttachmentContainingDBElement
|
|||
* @var Collection<int, PartAttachment>
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\Attachments\PartAttachment", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
* @ColumnSecurity(type="collection", prefix="attachments")
|
||||
* @ORM\OrderBy({"attachment_type" = "ASC", "name" = "ASC"})
|
||||
* @Assert\Valid()
|
||||
*/
|
||||
protected $attachments;
|
||||
|
|
|
@ -57,6 +57,7 @@ trait InstockTrait
|
|||
* @ORM\OneToMany(targetEntity="PartLot", mappedBy="part", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
* @Assert\Valid()
|
||||
* @ColumnSecurity(type="collection", prefix="lots")
|
||||
* @ORM\OrderBy({"amount" = "DESC"})
|
||||
*/
|
||||
protected $partLots;
|
||||
|
||||
|
|
|
@ -44,6 +44,7 @@ namespace App\Entity\Parts\PartTraits;
|
|||
|
||||
use App\Entity\PriceInformations\Orderdetail;
|
||||
use App\Security\Annotations\ColumnSecurity;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use function count;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
|
||||
|
@ -57,6 +58,7 @@ trait OrderTrait
|
|||
* @ORM\OneToMany(targetEntity="App\Entity\PriceInformations\Orderdetail", mappedBy="part", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
* @Assert\Valid()
|
||||
* @ColumnSecurity(prefix="orderdetails", type="collection")
|
||||
* @ORM\OrderBy({"supplier" = "ASC", "supplierpartnr" = "ASC"})
|
||||
*/
|
||||
protected $orderdetails;
|
||||
|
||||
|
|
|
@ -94,6 +94,7 @@ class Storelocation extends AbstractPartsContainingDBElement
|
|||
|
||||
/** @var Collection<int, StorelocationParameter>
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\Parameters\StorelocationParameter", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
* @ORM\OrderBy({"attachment_type" = "ASC", "name" = "ASC"})
|
||||
* @ORM\OrderBy({"group" = "ASC" ,"name" = "ASC"})
|
||||
* @Assert\Valid()
|
||||
*/
|
||||
|
|
|
@ -111,6 +111,7 @@ class Supplier extends AbstractCompany
|
|||
/**
|
||||
* @var Collection<int, SupplierAttachment>
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\Attachments\SupplierAttachment", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
* @ORM\OrderBy({"attachment_type" = "ASC", "name" = "ASC"})
|
||||
* @Assert\Valid()
|
||||
*/
|
||||
protected $attachments;
|
||||
|
|
|
@ -90,6 +90,7 @@ class Currency extends AbstractStructuralDBElement
|
|||
/**
|
||||
* @var Collection<int, CurrencyAttachment>
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\Attachments\CurrencyAttachment", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
* @ORM\OrderBy({"attachment_type" = "ASC", "name" = "ASC"})
|
||||
* @Assert\Valid()
|
||||
*/
|
||||
protected $attachments;
|
||||
|
|
|
@ -83,6 +83,7 @@ class Group extends AbstractStructuralDBElement implements HasPermissionsInterfa
|
|||
/**
|
||||
* @var Collection<int, GroupAttachment>
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\Attachments\ManufacturerAttachment", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
* @ORM\OrderBy({"attachment_type" = "ASC", "name" = "ASC"})
|
||||
* @Assert\Valid()
|
||||
*/
|
||||
protected $attachments;
|
||||
|
|
|
@ -229,6 +229,7 @@ class User extends AttachmentContainingDBElement implements UserInterface, HasPe
|
|||
/**
|
||||
* @var Collection<int, UserAttachment>
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\Attachments\UserAttachment", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
* @ORM\OrderBy({"attachment_type" = "ASC", "name" = "ASC"})
|
||||
*/
|
||||
protected $attachments;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue