Add updated at column (#6506)

Introduced `updatedAt` column. and fix an existing bug where the field
edition page was crashing because we were trying to compute Date('now')
(param coming from the default value)
This commit is contained in:
Félix Malfait
2024-08-02 10:03:36 +02:00
committed by GitHub
parent 676c902731
commit 0dcdda3928
3 changed files with 23 additions and 6 deletions

View File

@ -30,11 +30,10 @@ export abstract class BaseWorkspaceEntity {
@WorkspaceField({
standardId: BASE_OBJECT_STANDARD_FIELD_IDS.updatedAt,
type: FieldMetadataType.DATE_TIME,
label: 'Update date',
description: 'Update date',
icon: 'IconCalendar',
label: 'Last update',
description: 'Last time the record was changed',
icon: 'IconCalendarClock',
defaultValue: 'now',
})
@WorkspaceIsSystem()
updatedAt: Date;
}