// This model was generated by Lumber. However, you remain in control of your models.
// Learn how here: https://docs.forestadmin.com/documentation/v/v6/reference-guide/models/enrich-your-models
module.exports = (mongoose, Mongoose) => {
// This section contains the properties of your model, mapped to your collection's properties.
const schema = Mongoose.Schema({
contacts: {
type: String
},
slug: {
type: String,
require: true
},
tickets: {
type: [String]
},
contracts: [{ type: Mongoose.Schema.Types.ObjectId, ref: 'contracts' }]
}, {
timestamps: { createdAt: 'creationDate', updatedAt: 'lastUpdateDate' },
versionKey: false // You should be aware of the outcome after set to false
});
schema.index(
{
slug: 1
},
{ unique: true }
);
return mongoose.model('interconnections', schema, 'interconnections');
};