Spaces:
Sleeping
Sleeping
Download models/AuthenticationModel.js from merasabkuch/RaptusBackend: direct link, hf CLI and curl.
- Browser
- Download file 599 Bytes
-
https://huggingface.co/spaces/merasabkuch/RaptusBackend/resolve/main/models/AuthenticationModel.js
- Command line
-
hf download hf://spaces/merasabkuch/RaptusBackend/models/AuthenticationModel.js
-
curl -L -o AuthenticationModel.js https://huggingface.co/spaces/merasabkuch/RaptusBackend/resolve/main/models/AuthenticationModel.js
599 Bytes
| const { mongoose } = require("mongoose"); | |
| const Schema = mongoose.Schema; | |
| const loginAccountSchema = new Schema({ | |
| timestamp: { | |
| type: Date, | |
| default: Date.now() | |
| }, | |
| UserID: { | |
| type: Schema.Types.ObjectId, | |
| ref: "User" | |
| }, | |
| TeamId: { | |
| type: Schema.Types.ObjectId, | |
| ref: "Team" | |
| }, | |
| SessionID: { | |
| type: String | |
| }, | |
| Status: { | |
| type: Number | |
| }, | |
| }); | |
| loginAccountSchema.virtual("url").get(function () { | |
| return `/sessions/${this._id}`; | |
| }); | |
| module.exports = mongoose.model("Authentication", loginAccountSchema); |