This commit is contained in:
mahyargdz
2025-09-14 15:15:03 +03:30
commit be82059172
534 changed files with 51310 additions and 0 deletions
@@ -0,0 +1,7 @@
import { Types } from "mongoose";
export interface IToken {
userId: Types.ObjectId;
refreshToken: string;
refreshTokenExpire: Date;
}
+16
View File
@@ -0,0 +1,16 @@
import { Schema, model } from "mongoose";
import { IToken } from "./Abstraction/IToken";
const tokenSchema = new Schema<IToken>(
{
userId: { type: Schema.Types.ObjectId, ref: "User", required: true },
refreshToken: String,
refreshTokenExpire: Date,
},
{ timestamps: true, id: false },
);
const TokenModel = model<IToken>("Token", tokenSchema);
export { TokenModel };