Archived
2
This repository has been archived on 2023-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
definma-api/src/models/measurement_template.ts

11 lines
348 B
TypeScript
Raw Normal View History

2020-05-04 15:48:07 +02:00
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);