Sha256: 43e9e650eb94d28d72ec3599ef794b269e528a42623a5a9a0ef473ad4fa56f1a
Contents?: true
Size: 752 Bytes
Versions: 16
Compression:
Stored size: 752 Bytes
Contents
const mongoose = require('mongoose/browser'); const [Number, String] = [ mongoose.Schema.Types.Number, mongoose.Schema.Types.String, ]; const IdentifierSchema = mongoose.Schema({ <%- for attribute in attrs_with_extras -%> <% if attribute[:default] %><%= attribute[:name] %>: { type: <%= TYPE_LOOKUP_JS[attribute[:type]] -%>, default: '<%= attribute[:default] %>' },<% else %><%= attribute[:name] %>: <%= TYPE_LOOKUP_JS[attribute[:type]] -%>,<%- end %> <%- end %> }, { _id: false, id: false }); module.exports.IdentifierSchema = IdentifierSchema; class Identifier extends mongoose.Document { constructor(object) { super(object, IdentifierSchema); this._type = 'QDM::<%= datatype %>'; } } module.exports.Identifier = Identifier;
Version data entries
16 entries across 16 versions & 1 rubygems