Skip to content
This repository was archived by the owner on Jun 29, 2021. It is now read-only.
This repository was archived by the owner on Jun 29, 2021. It is now read-only.

[Question]  #404

@kuangshp

Description

@kuangshp

I want the updatedAt field to be updated to the current time by default every time the data is updated,But I couldn't figure out how to solve the problem

@IsDate()
  @prop({
    required: true,
    default: () => Date.now,
  })
  updatedAt!: Date;

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions