You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
890 B
28 lines
890 B
![]()
2 years ago
|
// user-types.js
|
||
|
// Copyright (C) 2022 DTP Technologies, LLC
|
||
|
// License: Apache-2.0
|
||
|
|
||
|
'use strict';
|
||
|
|
||
|
const mongoose = require('mongoose');
|
||
|
const Schema = mongoose.Schema;
|
||
|
|
||
|
module.exports.DTP_THEME_LIST = ['dtp-light', 'dtp-dark'];
|
||
|
|
||
|
module.exports.UserFlagsSchema = new Schema({
|
||
|
isAdmin: { type: Boolean, default: false, required: true },
|
||
|
isModerator: { type: Boolean, default: false, required: true },
|
||
|
});
|
||
|
|
||
|
module.exports.UserPermissionsSchema = new Schema({
|
||
|
canLogin: { type: Boolean, default: true, required: true },
|
||
|
canChat: { type: Boolean, default: true, required: true },
|
||
|
canComment: { type: Boolean, default: true, required: true },
|
||
|
canReport: { type: Boolean, default: true, required: true },
|
||
|
});
|
||
|
|
||
|
module.exports.UserOptInSchema = new Schema({
|
||
|
system: { type: Boolean, default: true, required: true },
|
||
|
marketing: { type: Boolean, default: true, required: true },
|
||
|
});
|