Add last logged in to User and delete users who are older than 1 year with no sessions

This commit is contained in:
William Oldham
2023-11-04 11:35:17 +00:00
parent b0af87a6b1
commit 04175fafae
4 changed files with 47 additions and 5 deletions

View File

@@ -22,6 +22,9 @@ export class User {
@Property({ type: 'date' })
createdAt: Date = new Date();
@Property({ type: 'date', nullable: true })
lastLoggedIn?: Date;
@Property({ name: 'permissions', type: types.array })
roles: string[] = [];