You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
487 B
JavaScript
15 lines
487 B
JavaScript
5 years ago
|
const mongoose = require('mongoose')
|
||
|
const schema = new mongoose.Schema({
|
||
|
uuid: String, //{ type: String, unique: true , required: false },
|
||
|
|
||
|
email: { type: String, unique: true },
|
||
|
username: String,
|
||
|
password: String,
|
||
|
dateAdded: { type: Date, default: () => new Date() },
|
||
|
validState: { type: Number, default: 0 },
|
||
|
info: Object,
|
||
|
lastUpdate: Date,
|
||
|
}, { versionKey: false })
|
||
|
|
||
|
schema.index({ email: true }, { unique: true })
|
||
|
module.exports = mongoose.model('MCAccount', schema)
|