11 lines
348 B
TypeScript
11 lines
348 B
TypeScript
|
import mongoose from 'mongoose';
|
||
|
|
||
|
const MeasurementTemplateSchema = new mongoose.Schema({
|
||
|
name: {type: String, index: {unique: true}},
|
||
|
parameters: [{
|
||
|
name: String,
|
||
|
range: mongoose.Schema.Types.Mixed
|
||
|
}]
|
||
|
}, {minimize: false}); // to allow empty objects
|
||
|
|
||
|
export default mongoose.model('measurement_template', MeasurementTemplateSchema);
|