docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10
{
"context": "Evaluates whether the solution uses @nestjs/mongoose schema tools to build inherited virtual fields with getter/setter hooks and option-driven population across a class hierarchy.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Schema setup",
"description": "Base and derived classes are decorated with @Schema and fields use @Prop before passing through SchemaFactory.createForClass to produce schemas for each level.",
"max_score": 20
},
{
"name": "Getter/setter virtual",
"description": "A base-class virtual uses @Virtual (or schema.virtual with getters/setters) to compute fullName from firstName/lastName and to split assignments back into those properties.",
"max_score": 25
},
{
"name": "Virtual options",
"description": "The mentor relationship virtual on the derived class supplies VirtualTypeOptions (ref, localField, foreignField, justOne) so populate targets a single mentor document tied to mentorId.",
"max_score": 25
},
{
"name": "Inherited virtuals",
"description": "Schemas generated for subclasses preserve virtuals defined on ancestors (via class extension and SchemaFactory.createForClass), so StaffProfile/LeadProfile models expose the base fullName virtual without redefining it.",
"max_score": 20
},
{
"name": "Model wiring",
"description": "registerProfiles constructs models from the generated schemas using the package’s connection/model helpers (e.g., connection.model with getModelToken/InjectModel integration for NestJS).",
"max_score": 10
}
]
}