mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-10 10:24:31 +02:00
Changed DB structure the way, many more elements can have attachments
Also every Element has now a preview attachment field. For the user this will be used as profile picture.
This commit is contained in:
parent
5061c29872
commit
ccc345cd1b
28 changed files with 985 additions and 28 deletions
|
@ -32,7 +32,10 @@
|
|||
namespace App\Entity\PriceInformations;
|
||||
|
||||
|
||||
use App\Entity\Attachments\CurrencyAttachment;
|
||||
use App\Entity\Attachments\SupplierAttachment;
|
||||
use App\Entity\Base\StructuralDBElement;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
@ -49,6 +52,12 @@ class Currency extends StructuralDBElement
|
|||
|
||||
public const PRICE_SCALE = 5;
|
||||
|
||||
/**
|
||||
* @var Collection|CurrencyAttachment[]
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\Attachments\CurrencyAttachment", mappedBy="element")
|
||||
*/
|
||||
protected $attachments;
|
||||
|
||||
/**
|
||||
* @var string The 3 letter ISO code of the currency.
|
||||
* @ORM\Column(type="string")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue