Tristan Yu
feat(brief): store week-level brief and return it when no SourceText exists
f26854d
raw
history blame contribute delete
481 Bytes
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);