2024-08-01 21:26:01 +00:00
|
|
|
const mongoose = require("mongoose");
|
|
|
|
const Schema = mongoose.Schema;
|
|
|
|
|
|
|
|
const UserSchema = new Schema({
|
|
|
|
name: {type: String, required: true},
|
|
|
|
username: { type: String, required: true, unique: true },
|
|
|
|
email: { type: String, required: true, unique: true },
|
2024-09-29 11:49:28 +00:00
|
|
|
password: { type: String },
|
2024-08-01 21:26:01 +00:00
|
|
|
date: { type: Date, default: Date.now},
|
|
|
|
admin: {type: Boolean, default: false},
|
2024-09-22 15:51:04 +00:00
|
|
|
image: { type: String },
|
|
|
|
settings: { type: Object }
|
2024-08-01 21:26:01 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
module.exports = mongoose.model('User', UserSchema);
|