mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-12 11:24:31 +02:00
Use Embeddables for EDACategoryInfo instead of a json column
This commit is contained in:
parent
d5f002ac20
commit
b76b2740a7
13 changed files with 280 additions and 150 deletions
|
@ -25,13 +25,14 @@ namespace App\Entity\Parts\PartTraits;
|
|||
|
||||
use App\Entity\EDA\EDAPartInfo;
|
||||
use Doctrine\ORM\Mapping\Column;
|
||||
use Doctrine\ORM\Mapping\Embedded;
|
||||
use Symfony\Component\Validator\Constraints\Valid;
|
||||
|
||||
trait EDATrait
|
||||
{
|
||||
#[Column(type: 'json_document', options: ['jsonb' => true])]
|
||||
#[Valid]
|
||||
protected ?EDAPartInfo $eda_info = null;
|
||||
#[Embedded(class: EDAPartInfo::class)]
|
||||
protected EDAPartInfo $eda_info;
|
||||
|
||||
public function getEdaInfo(): ?EDAPartInfo
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue