mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-21 18:39:31 +00: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
|
|
@ -61,9 +61,12 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Entity\Parts;
|
||||
|
||||
use App\Entity\Attachments\ManufacturerAttachment;
|
||||
use App\Entity\Attachments\SupplierAttachment;
|
||||
use App\Entity\Base\Company;
|
||||
use App\Entity\PriceInformations\Currency;
|
||||
use App\Validator\Constraints\Selectable;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
|
|
@ -75,6 +78,12 @@ use Symfony\Component\Validator\Constraints as Assert;
|
|||
*/
|
||||
class Supplier extends Company
|
||||
{
|
||||
/**
|
||||
* @var Collection|SupplierAttachment[]
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\Attachments\ManufacturerAttachment", mappedBy="element")
|
||||
*/
|
||||
protected $attachments;
|
||||
|
||||
/**
|
||||
* @ORM\OneToMany(targetEntity="Supplier", mappedBy="parent")
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue