initial commit
This commit is contained in:
18
models/Token.ts
Normal file
18
models/Token.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import {Schema, Types, model} from 'mongoose';
|
||||
|
||||
export interface Token{
|
||||
_id: Types.ObjectId;
|
||||
token: string;
|
||||
guildId: string;
|
||||
exp: number;
|
||||
};
|
||||
|
||||
const tokenSchema = new Schema<Token>({
|
||||
token: {type: String, required: true},
|
||||
guildId: {type: String, required: true},
|
||||
exp: {type: Number, required: true}
|
||||
});
|
||||
|
||||
export const tokenModel = model<Token>(
|
||||
'tokenModel', tokenSchema
|
||||
);
|
||||
Reference in New Issue
Block a user