mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +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
|
@ -35,7 +35,7 @@ use App\Entity\Parts\Part;
|
|||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* Class PartAttachment
|
||||
* A attachment attached to a part element.
|
||||
* @package App\Entity
|
||||
* @ORM\Entity()
|
||||
*/
|
||||
|
@ -43,7 +43,7 @@ class PartAttachment extends Attachment
|
|||
{
|
||||
|
||||
/**
|
||||
*
|
||||
* @var Part The element this attachment is associated with.
|
||||
* @ORM\ManyToOne(targetEntity="App\Entity\Parts\Part", inversedBy="attachments")
|
||||
* @ORM\JoinColumn(name="element_id", referencedColumnName="id", nullable=false, onDelete="CASCADE").
|
||||
*/
|
||||
|
@ -56,7 +56,6 @@ class PartAttachment extends Attachment
|
|||
}
|
||||
|
||||
$this->element = $element;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue