typegoose icon indicating copy to clipboard operation
typegoose copied to clipboard

[Question]

Open kuangshp opened this issue 4 years ago • 1 comments

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;

kuangshp avatar May 20 '20 08:05 kuangshp

This repository is not maintained anymore, please look at the new typegoose repo

hasezoey avatar May 20 '20 09:05 hasezoey