openhim-core
Version:
The OpenHIM core application that provides logging and routing of http requests
38 lines (33 loc) • 1.03 kB
JavaScript
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ClientModel = exports.ClientModelAPI = undefined;
var _mongoose = require('mongoose');
var _config = require('../config');
const ClientSchema = new _mongoose.Schema({
clientID: {
type: String, required: true, unique: true, index: true
},
clientDomain: {
type: String, unqiue: true, index: true
},
name: {
type: String, required: true
},
roles: [{ type: String, required: true }],
passwordAlgorithm: String,
passwordHash: String,
passwordSalt: String,
certFingerprint: String,
organization: String,
location: String,
softwareName: String,
description: String,
contactPerson: String,
contactPersonEmail: String
});
// compile the Client Schema into a Model
const ClientModelAPI = exports.ClientModelAPI = _config.connectionAPI.model('Client', ClientSchema);
const ClientModel = exports.ClientModel = _config.connectionDefault.model('Client', ClientSchema);
//# sourceMappingURL=clients.js.map