GlobalMetric.js 420 B

12345678910111213141516171819
  1. const mongoose = require('../infrastructure/Mongoose')
  2. const { Schema } = mongoose
  3. const GlobalMetricSchema = new Schema(
  4. {
  5. _id: { type: String, required: true },
  6. value: {
  7. type: Number,
  8. default: 0,
  9. },
  10. },
  11. {
  12. collection: 'globalMetrics',
  13. minimize: false,
  14. }
  15. )
  16. exports.GlobalMetric = mongoose.model('GlobalMetric', GlobalMetricSchema)
  17. exports.GlobalMetricSchema = GlobalMetricSchema