Add file model

This commit is contained in:
Liam
2022-11-13 22:45:01 +00:00
parent 66d4d68bb4
commit 772fe1574c
12 changed files with 314 additions and 23 deletions

View File

@ -1,9 +1,15 @@
import mongoose, { Schema } from "mongoose";
const schema = new Schema({
email: String,
username: String,
password: String,
// The username of the user
username: {
type: String,
index: true,
},
password: String, // The hashed password of the user
salt: String, // The salt the password was hashed with
uploadKey: String, // The users upload key for ShareX
lastLoginDate: Date, // The last time the user logged in
});
export default mongoose.models.User || mongoose.model("User", schema);