initial commit, should work

This commit is contained in:
quoije
2025-01-26 16:03:25 -05:00
commit 85ff5d08a0
27 changed files with 3066 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
const mongoose = require("mongoose");
const userSchema = new mongoose.Schema({
name: { type: String, required: true },
email: { type: String, required: true, unique: true },
password: { type: String, required: true },
role: { type: Number, default: 0 },
watchedMovies: [{
imdb_id: { type: String, required: false },
watchedDate: { type: Date, default: Date.now } // Store the watched date
}]
});
const User = mongoose.model("User", userSchema);
module.exports = User;