From 96261c6c7436cc43aac9bfbc49c217aa15b110dd Mon Sep 17 00:00:00 2001 From: Eugene Lok Date: Wed, 2 Feb 2022 07:06:38 -0700 Subject: [PATCH] Update user model with creation and update fields --- server/src/models/User.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/server/src/models/User.ts b/server/src/models/User.ts index 26aacd0..7f6b49c 100644 --- a/server/src/models/User.ts +++ b/server/src/models/User.ts @@ -109,6 +109,18 @@ export class User { @Field(() => Number, { description: "The user's account status" }) @Prop({ default: 1, index: true }) accountStatus: number; + + @Field(() => Date, { + description: "When the user's account was created.", + }) + @Prop() + createdAt?: Date; + + @Field(() => Date, { + description: "When the user's account was last updated.", + }) + @Prop() + updatedAt?: Date; } export const UserModel = getModelForClass(User);