This repository has been archived on 2025-12-25. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
qmi-cloud/qmi-cloud-common/models/User.js
2023-05-10 13:38:22 +02:00

50 lines
814 B
JavaScript

const mongoose = require('mongoose')
const userSchema = new mongoose.Schema({
created: {
type: Date,
default: Date.now,
index : true
},
updated: {
type: Date,
default: Date.now
},
displayName: String,
upn: String,
sub: String,
oid: {
type: String,
index: true
},
role: {
type: String,
default: "user"
},
lastLogin: {
type: Date
},
qcsUserId: {
type: String
},
qcsUserSubject: {
type: String
},
active: {
type: Boolean,
default: true
},
jobTitle: {
type: String
},
mail: {
type: String
},
featureFlags: {
type: Array
}
});
module.exports = mongoose.model('User', userSchema);