mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-08 01:14:34 +02:00
Show parts count on AdminPages of PartsContainingDBElements
This commit is contained in:
parent
082608dbd9
commit
e19cd67b88
10 changed files with 97 additions and 38 deletions
|
@ -61,6 +61,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Entity\Parts;
|
||||
|
||||
use App\Entity\Base\PartsContainingDBElement;
|
||||
use App\Entity\Base\StructuralDBElement;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
|
@ -70,7 +71,7 @@ use Doctrine\ORM\Mapping as ORM;
|
|||
* @ORM\Entity(repositoryClass="App\Repository\StructuralDBElementRepository")
|
||||
* @ORM\Table("`storelocations`")
|
||||
*/
|
||||
class Storelocation extends StructuralDBElement
|
||||
class Storelocation extends PartsContainingDBElement
|
||||
{
|
||||
/**
|
||||
* @ORM\OneToMany(targetEntity="Storelocation", mappedBy="parent")
|
||||
|
@ -108,6 +109,15 @@ class Storelocation extends StructuralDBElement
|
|||
*/
|
||||
protected $storage_type;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToMany(targetEntity="Part", fetch="EXTRA_LAZY")
|
||||
* @ORM\JoinTable(name="part_lots",
|
||||
* joinColumns={@ORM\JoinColumn(name="id_store_location", referencedColumnName="id")},
|
||||
* inverseJoinColumns={@ORM\JoinColumn(name="id_part", referencedColumnName="id")}
|
||||
* )
|
||||
*/
|
||||
protected $parts;
|
||||
|
||||
/********************************************************************************
|
||||
*
|
||||
* Getters
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue