mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-27 04:08:57 +02:00
Enforce unique names for attachments (per attachment type and part)
This commit is contained in:
parent
7bda340368
commit
41df76e8e6
12 changed files with 24 additions and 0 deletions
|
@ -44,11 +44,13 @@ namespace App\Entity\Attachments;
|
|||
|
||||
use App\Entity\Parts\Part;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
||||
|
||||
/**
|
||||
* A attachment attached to a part element.
|
||||
*
|
||||
* @ORM\Entity()
|
||||
* @UniqueEntity({"name", "attachment_type", "element"})
|
||||
*/
|
||||
class PartAttachment extends Attachment
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue