26 lines
464 B
JavaScript
26 lines
464 B
JavaScript
const mongoose = require('mongoose');
|
|
|
|
const configSchema = new mongoose.Schema(
|
|
{
|
|
keyName: {
|
|
type: String,
|
|
required: true,
|
|
unique: true,
|
|
},
|
|
encryptedValue: {
|
|
type: String,
|
|
required: true,
|
|
},
|
|
iv: {
|
|
type: String, // Initialization vector needed for decryption
|
|
required: true,
|
|
}
|
|
},
|
|
{
|
|
timestamps: true,
|
|
}
|
|
);
|
|
|
|
const Config = mongoose.model('Config', configSchema);
|
|
module.exports = Config;
|