Archived
backend init
This commit is contained in:
1 parent
2568e247b8
commit
3e62017db9
7 files changed
+18206
-11509
No files matched your search
@@ -0,0 +1,28 @@
|
||||
const mongoose = require("mongoose");
|
||||
const schema = mongoose.Schema;
|
||||
|
||||
const roomSchema = new schema({
|
||||
code: {
|
||||
type: Number,
|
||||
required: true,
|
||||
},
|
||||
question: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
|
||||
yes: {
|
||||
type: Number,
|
||||
required: false,
|
||||
},
|
||||
no: {
|
||||
type: Number,
|
||||
required: false,
|
||||
},
|
||||
logs: [{ time: String, vote: Boolean }],
|
||||
socket: {
|
||||
type: String,
|
||||
},
|
||||
});
|
||||
|
||||
module.exports = mongoose.model("rooms", roomSchema);
|
||||
Reference in new issue
Block a user