You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
382 B
19 lines
382 B
const mongoose = require("mongoose");
|
|
|
|
const { WATCH_STATUS, RATINGS } = require("../util/consts");
|
|
|
|
module.exports = mongoose.model(
|
|
"Userdata",
|
|
new mongoose.Schema({
|
|
movieId: { type: String, required: true },
|
|
userId: { type: mongoose.Types.ObjectId },
|
|
watchStatus: {
|
|
type: String,
|
|
enum: WATCH_STATUS,
|
|
},
|
|
rating: {
|
|
type: String,
|
|
enum: RATINGS,
|
|
},
|
|
}),
|
|
);
|
|
|