Sha256: 8dd9953991608a09fc696c34f629e229d458dbc6d32e4ba54475f3137e1e3b73
Contents?: true
Size: 649 Bytes
Versions: 19
Compression:
Stored size: 649 Bytes
Contents
const mongoose = require('mongoose/browser'); // using mBuffer to not conflict with system Buffer const [mBuffer, ObjectId] = [ mongoose.Schema.Types.Buffer, mongoose.Schema.Types.ObjectId, ]; const MeasurePackageSchema = new mongoose.Schema( { file: mBuffer, measure: { type: ObjectId, ref: 'Measure' }, }, // Options { timestamps: { createdAt: 'created_at', updatedAt: 'updated_at' }, } ); module.exports.MeasurePackageSchema = MeasurePackageSchema; class MeasurePackage extends mongoose.Document { constructor(object) { super(object, MeasurePackageSchema); } } module.exports.MeasurePackage = MeasurePackage;
Version data entries
19 entries across 19 versions & 1 rubygems