mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-14 20:35:08 +02:00
Added missing lastModified and creationDate fields to API response
This commit is contained in:
parent
e09f60e71f
commit
64c38042a0
9 changed files with 56 additions and 4 deletions
|
@ -177,6 +177,12 @@ class Category extends AbstractPartsContainingDBElement
|
|||
#[ORM\OrderBy(['group' => 'ASC', 'name' => 'ASC'])]
|
||||
protected Collection $parameters;
|
||||
|
||||
#[Groups(['category:read'])]
|
||||
protected ?\DateTimeInterface $addedDate = null;
|
||||
#[Groups(['category:read'])]
|
||||
protected ?\DateTimeInterface $lastModified = null;
|
||||
|
||||
|
||||
public function getPartnameHint(): string
|
||||
{
|
||||
return $this->partname_hint;
|
||||
|
|
|
@ -129,6 +129,12 @@ class Footprint extends AbstractPartsContainingDBElement
|
|||
#[Groups(['footprint:read', 'footprint:write'])]
|
||||
protected Collection $parameters;
|
||||
|
||||
#[Groups(['footprint:read'])]
|
||||
protected ?\DateTimeInterface $addedDate = null;
|
||||
#[Groups(['footprint:read'])]
|
||||
protected ?\DateTimeInterface $lastModified = null;
|
||||
|
||||
|
||||
/****************************************
|
||||
* Getters
|
||||
****************************************/
|
||||
|
|
|
@ -150,6 +150,12 @@ class MeasurementUnit extends AbstractPartsContainingDBElement
|
|||
#[Groups(['measurement_unit:read', 'measurement_unit:write'])]
|
||||
protected Collection $parameters;
|
||||
|
||||
#[Groups(['measurement_unit:read'])]
|
||||
protected ?\DateTimeInterface $addedDate = null;
|
||||
#[Groups(['measurement_unit:read'])]
|
||||
protected ?\DateTimeInterface $lastModified = null;
|
||||
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
|
|
|
@ -150,6 +150,12 @@ class Part extends AttachmentContainingDBElement
|
|||
#[Groups(['part:read', 'part:write'])]
|
||||
protected ?Attachment $master_picture_attachment = null;
|
||||
|
||||
#[Groups(['part:read'])]
|
||||
protected ?\DateTimeInterface $addedDate = null;
|
||||
#[Groups(['part:read'])]
|
||||
protected ?\DateTimeInterface $lastModified = null;
|
||||
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->attachments = new ArrayCollection();
|
||||
|
|
|
@ -164,6 +164,12 @@ class StorageLocation extends AbstractPartsContainingDBElement
|
|||
#[Groups(['location:read', 'location:write'])]
|
||||
protected ?Attachment $master_picture_attachment = null;
|
||||
|
||||
#[Groups(['location:read'])]
|
||||
protected ?\DateTimeInterface $addedDate = null;
|
||||
#[Groups(['location:read'])]
|
||||
protected ?\DateTimeInterface $lastModified = null;
|
||||
|
||||
|
||||
/********************************************************************************
|
||||
*
|
||||
* Getters
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue