mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-24 02:38:50 +02:00
Save element parameters in its own database table (dont use JSON)
This makes it easier to query for specific parameters.
This commit is contained in:
parent
a6e0f1738b
commit
719e21c0df
35 changed files with 738 additions and 183 deletions
|
@ -44,10 +44,13 @@ namespace App\Entity\UserSystem;
|
|||
|
||||
use App\Entity\Attachments\GroupAttachment;
|
||||
use App\Entity\Base\AbstractStructuralDBElement;
|
||||
use App\Entity\Parameters\GroupParameter;
|
||||
use App\Entity\Parameters\SupplierParameter;
|
||||
use App\Security\Interfaces\HasPermissionsInterface;
|
||||
use App\Validator\Constraints\ValidPermission;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
/**
|
||||
* This entity represents an user group.
|
||||
|
@ -81,6 +84,7 @@ class Group extends AbstractStructuralDBElement implements HasPermissionsInterfa
|
|||
/**
|
||||
* @var Collection|GroupAttachment[]
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\Attachments\ManufacturerAttachment", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
* @Assert\Valid()
|
||||
*/
|
||||
protected $attachments;
|
||||
|
||||
|
@ -90,6 +94,12 @@ class Group extends AbstractStructuralDBElement implements HasPermissionsInterfa
|
|||
*/
|
||||
protected $permissions;
|
||||
|
||||
/** @var GroupParameter[]
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\Parameters\GroupParameter", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
* @Assert\Valid()
|
||||
*/
|
||||
protected $parameters;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue