Skip to content

Commit

Permalink
Merge pull request #24 from Tech-Start-UCalgary/eugene/user-model-update
Browse files Browse the repository at this point in the history
Update user model with creation and update fields
  • Loading branch information
zeyadomran authored Feb 4, 2022
2 parents 8f6604e + 28178da commit 731170b
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({ default: new Date() })
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 731170b

Please sign in to comment.