To design and implement a model class named Question for a MongoDB database. This class should encapsulate the essential properties and methods required to interact with the database for CRUD operations. The properties of the Question class will include id, name, status, description, and code.
Properties
id: A unique identifier for the question. This will typically be the MongoDB ObjectId.
name: A string representing the name of the question.
status: A string representing the status of the question (e.g., "active", "inactive").
description: A string providing a detailed description of the question.
code: A string or document containing the code related to the question.
Objective
To design and implement a model class named
Question
for a MongoDB database. This class should encapsulate the essential properties and methods required to interact with the database for CRUD operations. The properties of theQuestion
class will includeid
,name
,status
,description
, andcode
.Properties