Initial commit: Своя Игра - multiplayer quiz game
This commit is contained in:
33
server/src/models/Question.js
Normal file
33
server/src/models/Question.js
Normal file
@@ -0,0 +1,33 @@
|
||||
import mongoose from 'mongoose';
|
||||
|
||||
const questionSchema = new mongoose.Schema({
|
||||
category: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
points: {
|
||||
type: Number,
|
||||
required: true,
|
||||
enum: [100, 200, 300, 400, 500, 200, 400, 600, 800, 1000]
|
||||
},
|
||||
question: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
answer: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
round: {
|
||||
type: Number,
|
||||
required: true,
|
||||
enum: [1, 2],
|
||||
default: 1
|
||||
}
|
||||
}, {
|
||||
timestamps: true
|
||||
});
|
||||
|
||||
const Question = mongoose.model('Question', questionSchema);
|
||||
|
||||
export default Question;
|
||||
Reference in New Issue
Block a user