mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-26 11:48:49 +02:00
Show attachments and preview image in API response
This commit is contained in:
parent
1823bc6528
commit
87e881f8e0
7 changed files with 18 additions and 14 deletions
|
@ -253,13 +253,12 @@ class User extends AttachmentContainingDBElement implements UserInterface, HasPe
|
|||
*/
|
||||
#[ORM\OneToMany(mappedBy: 'element', targetEntity: UserAttachment::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
||||
#[ORM\OrderBy(['name' => 'ASC'])]
|
||||
#[Groups(['user:read'])]
|
||||
#[ApiProperty(readableLink: false, writableLink: false)]
|
||||
#[Groups(['user:read', 'user:write'])]
|
||||
protected Collection $attachments;
|
||||
|
||||
#[ORM\ManyToOne(targetEntity: UserAttachment::class)]
|
||||
#[ORM\JoinColumn(name: 'id_preview_attachment', onDelete: 'SET NULL')]
|
||||
#[Groups(['user:read'])]
|
||||
#[Groups(['user:read', 'usser:write'])]
|
||||
protected ?Attachment $master_picture_attachment = null;
|
||||
|
||||
/** @var \DateTimeInterface|null The time when the backup codes were generated
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue