docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10
{
"context": "Evaluates how well the solution uses @nestjs/mongoose discriminator support to store article and video variants in one collection while exposing the required service API.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Base schema setup",
"description": "Defines a parent schema with @Schema/SchemaFactory.createForClass (or equivalent) that sets a discriminatorKey and registers it via MongooseModule.forFeature or the model token helpers as the shared collection.",
"max_score": 25
},
{
"name": "Article discriminator",
"description": "Registers an article discriminator (kind \"article\") on the parent model using the library’s discriminator configuration (discriminators array or model.discriminator) so wordCount/author fields are enforced on saves.",
"max_score": 20
},
{
"name": "Video discriminator",
"description": "Registers a video discriminator (kind \"video\") on the parent model using the library’s discriminator configuration so durationSeconds/resolution fields are enforced on saves.",
"max_score": 20
},
{
"name": "Shared model usage",
"description": "Creates, lists, and finds records through the parent model so both discriminator types land in the same MongoDB collection and come back with the correct subclass documents.",
"max_score": 20
},
{
"name": "DI wiring",
"description": "Injects or retrieves the parent/discriminator models using @InjectModel, getModelToken, or equivalent NestJS Mongoose helpers rather than manual connections, enabling the service methods to call the registered discriminators.",
"max_score": 15
}
]
}