Download server/models/GameResult.js from eznd/bao: direct link, hf CLI and curl.
- Browser
- Download file 511 Bytes
-
https://huggingface.co/spaces/eznd/bao/resolve/main/server/models/GameResult.js
- Command line
-
hf download hf://spaces/eznd/bao/server/models/GameResult.js
-
curl -L -o GameResult.js https://huggingface.co/spaces/eznd/bao/resolve/main/server/models/GameResult.js
511 Bytes
| const mongoose = require('mongoose'); | |
| const gameResultSchema = new mongoose.Schema({ | |
| gameId: { type: mongoose.Schema.Types.ObjectId, ref: 'Game', required: true, unique: true }, | |
| winnerProfileId: { type: mongoose.Schema.Types.ObjectId, ref: 'Profile', required: true }, | |
| loserProfileId: { type: mongoose.Schema.Types.ObjectId, ref: 'Profile', required: true }, | |
| isVsAi: { type: Boolean, default: false }, | |
| }, { timestamps: true }); | |
| module.exports = mongoose.model('GameResult', gameResultSchema); | |