mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-09 16:59:03 +01: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:
@@ -31,9 +31,12 @@
|
||||
|
||||
namespace App\Entity\UserSystem;
|
||||
|
||||
use App\Entity\Attachments\GroupAttachment;
|
||||
use App\Entity\Attachments\SupplierAttachment;
|
||||
use App\Entity\Base\StructuralDBElement;
|
||||
use App\Security\Interfaces\HasPermissionsInterface;
|
||||
use App\Validator\Constraints\ValidPermission;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
@@ -44,6 +47,13 @@ use Doctrine\ORM\Mapping as ORM;
|
||||
*/
|
||||
class Group extends StructuralDBElement implements HasPermissionsInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* @var Collection|GroupAttachment[]
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\Attachments\ManufacturerAttachment", mappedBy="element")
|
||||
*/
|
||||
protected $attachments;
|
||||
|
||||
/**
|
||||
* @ORM\OneToMany(targetEntity="Group", mappedBy="parent")
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user