Added the refreshDate to the User.ts model

This commit is contained in:
2023-11-08 12:40:05 +01:00
parent 61d766e26b
commit c9f9b030a5

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