mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-17 08:11:14 +02:00
Moved getParts() and getPartsCount() to a repository (instead of a class method).
This commit is contained in:
parent
350f1bb979
commit
14adb77a97
24 changed files with 421 additions and 71 deletions
|
@ -79,7 +79,7 @@ trait BasicPropertyTrait
|
|||
/**
|
||||
* @var Category The category this part belongs too (e.g. Resistors). Use tags, for more complex grouping.
|
||||
* Every part must have a category.
|
||||
* @ORM\ManyToOne(targetEntity="Category", inversedBy="parts")
|
||||
* @ORM\ManyToOne(targetEntity="Category")
|
||||
* @ORM\JoinColumn(name="id_category", referencedColumnName="id", nullable=false)
|
||||
* @ColumnSecurity(prefix="category", type="App\Entity\Parts\Category")
|
||||
* @Selectable()
|
||||
|
@ -88,7 +88,7 @@ trait BasicPropertyTrait
|
|||
|
||||
/**
|
||||
* @var Footprint|null The footprint of this part (e.g. DIP8)
|
||||
* @ORM\ManyToOne(targetEntity="Footprint", inversedBy="parts")
|
||||
* @ORM\ManyToOne(targetEntity="Footprint")
|
||||
* @ORM\JoinColumn(name="id_footprint", referencedColumnName="id")
|
||||
* @ColumnSecurity(prefix="footprint", type="App\Entity\Parts\Footprint")
|
||||
* @Selectable()
|
||||
|
|
|
@ -72,7 +72,7 @@ trait InstockTrait
|
|||
|
||||
/**
|
||||
* @var ?MeasurementUnit the unit in which the part's amount is measured
|
||||
* @ORM\ManyToOne(targetEntity="MeasurementUnit", inversedBy="parts")
|
||||
* @ORM\ManyToOne(targetEntity="MeasurementUnit")
|
||||
* @ORM\JoinColumn(name="id_part_unit", referencedColumnName="id", nullable=true)
|
||||
* @ColumnSecurity(type="object", prefix="unit")
|
||||
*/
|
||||
|
|
|
@ -54,7 +54,7 @@ trait ManufacturerTrait
|
|||
{
|
||||
/**
|
||||
* @var Manufacturer|null The manufacturer of this part
|
||||
* @ORM\ManyToOne(targetEntity="Manufacturer", inversedBy="parts")
|
||||
* @ORM\ManyToOne(targetEntity="Manufacturer")
|
||||
* @ORM\JoinColumn(name="id_manufacturer", referencedColumnName="id")
|
||||
* @ColumnSecurity(prefix="manufacturer", type="App\Entity\Parts\Manufacturer")
|
||||
* @Selectable()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue