Added the refreshDate to the User.ts model

This commit is contained in:
Mathias Wagner 2023-11-08 12:40:05 +01:00
parent 61d766e26b
commit c9f9b030a5
Signed by: Mathias
GPG Key ID: B8DC354B0A1F5B44

View File

@ -15,6 +15,7 @@ export interface IUser extends Model<InferAttributes<IUser>, InferCreationAttrib
avatarId?: string
accessToken: string
refreshToken: string
refreshDate?: Date
created?: Date
}
@ -48,6 +49,10 @@ const UserSchema = sequelize.define<IUser>('users', {
type: DataTypes.STRING,
allowNull: false
},
refreshDate: {
type: DataTypes.DATE,
allowNull: false
},
created: {
type: DataTypes.DATE,
defaultValue: Date.now