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, }, }), );