Download api/models/schema/tokenSchema.js from Zhitomir/chat: direct link, hf CLI and curl.
- Browser
- Download file 436 Bytes
-
https://huggingface.co/spaces/Zhitomir/chat/resolve/main/api/models/schema/tokenSchema.js
- Command line
-
hf download hf://spaces/Zhitomir/chat/api/models/schema/tokenSchema.js
-
curl -L -o tokenSchema.js https://huggingface.co/spaces/Zhitomir/chat/resolve/main/api/models/schema/tokenSchema.js
436 Bytes
| const mongoose = require('mongoose'); | |
| const Schema = mongoose.Schema; | |
| const tokenSchema = new Schema({ | |
| userId: { | |
| type: Schema.Types.ObjectId, | |
| required: true, | |
| ref: 'user', | |
| }, | |
| email: { | |
| type: String, | |
| }, | |
| token: { | |
| type: String, | |
| required: true, | |
| }, | |
| createdAt: { | |
| type: Date, | |
| required: true, | |
| default: Date.now, | |
| expires: 900, | |
| }, | |
| }); | |
| module.exports = mongoose.model('Token', tokenSchema); | |