mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-02-13 21:19:36 +00: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
|
|
@ -23,10 +23,13 @@ declare(strict_types=1);
|
|||
namespace App\Entity\Attachments;
|
||||
|
||||
use App\Entity\Base\AbstractStructuralDBElement;
|
||||
use App\Entity\Parameters\AttachmentTypeParameter;
|
||||
use App\Entity\Parameters\DeviceParameter;
|
||||
use App\Validator\Constraints\ValidFileFilter;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
/**
|
||||
* Class AttachmentType.
|
||||
|
|
@ -56,9 +59,16 @@ class AttachmentType extends AbstractStructuralDBElement
|
|||
/**
|
||||
* @var Collection|AttachmentTypeAttachment[]
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\Attachments\AttachmentTypeAttachment", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
* @Assert\Valid()
|
||||
*/
|
||||
protected $attachments;
|
||||
|
||||
/** @var AttachmentTypeParameter[]
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\Parameters\AttachmentTypeParameter", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
* @Assert\Valid()
|
||||
*/
|
||||
protected $parameters;
|
||||
|
||||
/**
|
||||
* @var Collection|Attachment[]
|
||||
* @ORM\OneToMany(targetEntity="Attachment", mappedBy="attachment_type")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue