uLicense/uLicense-1.2.6/dashboard/models/userModel.js

45 lines
698 B
JavaScript
Raw Permalink Normal View History

2022-09-15 04:43:05 +02:00
const mongoose = require('mongoose');
const userSchema = new mongoose.Schema(
{
name: {
type: String,
required: [true, 'Please enter your name!'],
trim: true,
},
discordwebhook: {
type: String,
},
DiscordID: {
type: String,
},
email: {
type: String,
required: [true, 'Please enter your email!'],
trim: true,
unique: true,
},
password: {
type: String,
required: [true, 'Please enter your password!'],
},
role: {
type: Number,
default: 0,
},
lastlogin: {
type: String,
},
APIkey: {
type: String,
},
licenses: {
type: Array,
},
},
{
timestamps: true,
}
);
module.exports = mongoose.model('Users', userSchema);