-
-
Notifications
You must be signed in to change notification settings - Fork 44
Expand file tree
/
Copy pathuser.js
More file actions
25 lines (23 loc) · 517 Bytes
/
Copy pathuser.js
File metadata and controls
25 lines (23 loc) · 517 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import mongoose from "mongoose";
const User = new mongoose.Schema({
username: String,
email: String,
password: String,
uid: String,
torrents: Object,
created: Number,
banned: Boolean,
role: String,
invitedBy: mongoose.Schema.ObjectId,
remainingInvites: Number,
emailVerified: Boolean,
bonusPoints: Number,
totp: {
enabled: Boolean,
secret: String,
qr: String,
backup: [String],
},
bookmarks: [mongoose.Schema.ObjectId],
});
export default mongoose.model("user", User);