21 lines
361 B
JavaScript
21 lines
361 B
JavaScript
const mongoose = require("mongoose");
|
|
|
|
const User = mongoose.model(
|
|
"User",
|
|
new mongoose.Schema({
|
|
username: String,
|
|
email: String,
|
|
password: String,
|
|
active: Boolean,
|
|
balance: Number,
|
|
walletid: String,
|
|
roles: [
|
|
{
|
|
type: mongoose.Schema.Types.ObjectId,
|
|
ref: "Role"
|
|
}
|
|
]
|
|
})
|
|
);
|
|
|
|
module.exports = User; |