Site Maintainer commited on
Commit
8e21ae0
·
1 Parent(s): d02c5fe

Replace SourceText schema with known-good version (quoted enums incl. portrait-split)

Browse files
Files changed (1) hide show
  1. models/SourceText.js +6 -5
models/SourceText.js CHANGED
@@ -12,10 +12,10 @@ const sourceTextSchema = new mongoose.Schema({
12
  sourceLanguage: { type: String, required: true },
13
 
14
  sourceType: {
15
- type: String,
16
- enum: [api, manual, practice, tutorial, weekly-practice],
17
- default: manual
18
- },
19
  category: {
20
  type: String,
21
  enum: ['practice', 'tutorial', 'weekly-practice'],
@@ -30,7 +30,8 @@ const sourceTextSchema = new mongoose.Schema({
30
  imageAlt: { type: String },
31
  // Image-only configuration
32
  imageSize: { type: Number, default: 200 },
33
- imageAlignment: { type: String, enum: [left, center, right, portrait-split], default: center },
 
34
  culturalElements: [culturalElementSchema],
35
  difficulty: {
36
  type: String,
 
12
  sourceLanguage: { type: String, required: true },
13
 
14
  sourceType: {
15
+ type: String,
16
+ enum: ['api', 'manual', 'practice', 'tutorial', 'weekly-practice'],
17
+ default: 'manual'
18
+ },
19
  category: {
20
  type: String,
21
  enum: ['practice', 'tutorial', 'weekly-practice'],
 
30
  imageAlt: { type: String },
31
  // Image-only configuration
32
  imageSize: { type: Number, default: 200 },
33
+ // Add 'portrait-split' for week 4–6 advanced layout (non-breaking, additive)
34
+ imageAlignment: { type: String, enum: ['left', 'center', 'right', 'portrait-split'], default: 'center' },
35
  culturalElements: [culturalElementSchema],
36
  difficulty: {
37
  type: String,