Sha256: 74ef8ba6f87097366c2dbe53f99f9f2b04d714309f420d3e19a4715c3c81d4af

Contents?: true

Size: 899 Bytes

Versions: 19

Compression:

Stored size: 899 Bytes

Contents

const mongoose = require('mongoose/browser');
const { StatementDependencySchema } = require('./CQLStatementDependency');

const [Mixed, mDate] = [
  mongoose.Schema.Types.Mixed,
  mongoose.Schema.Types.Date,
];

const CQLLibrarySchema = new mongoose.Schema(
  {
    library_name: String,
    library_version: String,
    cql: String,
    elm: Mixed,
    elm_annotations: Mixed,
    is_main_library: { type: Boolean, default: false },
    is_top_level: { type: Boolean, default: true },
    statement_dependencies: [StatementDependencySchema],
  },
  // Options
  {
    timestamps: { createdAt: 'created_at', updatedAt: 'updated_at' }, // These are the Mongoid conventions for timestamps
  }
);

module.exports.CQLLibrarySchema = CQLLibrarySchema;
class CQLLibrary extends mongoose.Document {
  constructor(object) {
    super(object, CQLLibrarySchema);
  }
}
module.exports.CQLLibrary = CQLLibrary;

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
cqm-models-4.2.0 app/assets/javascripts/cqm/CQLLibrary.js
cqm-models-3.1.2 app/assets/javascripts/cqm/CQLLibrary.js
cqm-models-4.1.1 app/assets/javascripts/cqm/CQLLibrary.js
cqm-models-4.1.0 app/assets/javascripts/cqm/CQLLibrary.js
cqm-models-4.0.2 app/assets/javascripts/cqm/CQLLibrary.js
cqm-models-4.0.1 app/assets/javascripts/cqm/CQLLibrary.js
cqm-models-4.0.0 app/assets/javascripts/cqm/CQLLibrary.js
cqm-models-3.1.1 app/assets/javascripts/cqm/CQLLibrary.js
cqm-models-3.1.0 app/assets/javascripts/cqm/CQLLibrary.js
cqm-models-3.0.6 app/assets/javascripts/cqm/CQLLibrary.js
cqm-models-3.0.5 app/assets/javascripts/cqm/CQLLibrary.js
cqm-models-3.0.4 app/assets/javascripts/cqm/CQLLibrary.js
cqm-models-3.0.3 app/assets/javascripts/cqm/CQLLibrary.js
cqm-models-3.0.2 app/assets/javascripts/cqm/CQLLibrary.js
cqm-models-3.0.1 app/assets/javascripts/cqm/CQLLibrary.js
cqm-models-2.0.1 app/assets/javascripts/cqm/CQLLibrary.js
cqm-models-3.0.0 app/assets/javascripts/cqm/CQLLibrary.js
cqm-models-2.0.0 app/assets/javascripts/cqm/CQLLibrary.js
cqm-models-1.1.1.0 app/assets/javascripts/cqm/CQLLibrary.js