Skip to content

Commit

Permalink
Update user model with creation and update fields
Browse files Browse the repository at this point in the history
  • Loading branch information
eugene-lok committed Feb 2, 2022
1 parent 6630fcb commit 96261c6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions server/src/models/User.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

0 comments on commit 96261c6

Please sign in to comment.