File size: 481 Bytes
f26854d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
const mongoose = require('mongoose');

const weekBriefSchema = new mongoose.Schema({
  category: {
    type: String,
    enum: ['tutorial', 'weekly-practice'],
    required: true,
    index: true
  },
  weekNumber: {
    type: Number,
    required: true,
    index: true
  },
  translationBrief: {
    type: String,
  }
}, { timestamps: true, indexes: [{ fields: { category: 1, weekNumber: 1 }, unique: true }] });

module.exports = mongoose.model('WeekBrief', weekBriefSchema);