mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-25 03:08:51 +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\UserSystem\User;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
||||
|
||||
/**
|
||||
* A attachment attached to a user element.
|
||||
*
|
||||
* @ORM\Entity()
|
||||
* @UniqueEntity({"name", "attachment_type", "element"})
|
||||
*/
|
||||
class UserAttachment extends Attachment
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue