mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-25 00:27:32 +01: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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user