ADD: Events
ADD: Index One Belonging ADD: Belonging Code
This commit is contained in:
@@ -20,7 +20,6 @@ const belongingSchema = new mongoose.Schema(
|
||||
},
|
||||
unit: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
description: String,
|
||||
relatedProjects: [String],
|
||||
@@ -62,7 +61,7 @@ const belongingSchema = new mongoose.Schema(
|
||||
}
|
||||
)
|
||||
|
||||
// belongingSchema.plugin(AutoIncrement, { inc_field: 'belongingCode' })
|
||||
belongingSchema.plugin(AutoIncrement, { inc_field: 'belongingCode' })
|
||||
|
||||
belongingSchema.methods.getDocumentsSignedUrls = function () {
|
||||
return getMultipleSignedUrls(this.documentUrls, 'belonging-documents')
|
||||
@@ -74,5 +73,7 @@ belongingSchema.methods.getMainImagedSignedUrl = function () {
|
||||
|
||||
belongingSchema.index({ location: '2dsphere' }) // Enable geospatial queries
|
||||
|
||||
// belongingSchema.plugin(AutoIncrement, { inc_field: 'numId' })
|
||||
|
||||
const Belonging = mongoose.model('Belonging', belongingSchema)
|
||||
module.exports = Belonging
|
||||
|
||||
Reference in New Issue
Block a user