Base Mongoose instance the model uses.
If this is a discriminator model, baseModelName is the name of the base model.
Collection the model uses.
Connection the model uses.
Registered discriminators for this model.
Virtual getter that by default returns the document's _id field cast to a string, or in the case of ObjectIds, its hexString. This id getter may be disabled by passing the option { id: false } at schema construction time. If disabled, id behaves like any other field on a document and can be assigned any value.
The name of the model
Schema the model uses.
subjects[0]
is an array of subjects for Monday,
subjects[5]
- for Saturday, there is no subjects[6]
(Sunday) schedule
AcademicSubjectDoc.name[][], may be empty
Returns a number[] of subjectsAmount
length and its sum in an object.
This array defines the number of times each subject appears in the schedule.
Length of times array to generate.
Core implementation of setRandomSchedule, error checks are supposed to be already done when invoking it.
Array of projected AcademicSubjects retrieved from the db.
Signal that we desire an increment of this documents version.
Override whether mongoose thinks this doc is deleted or not
whether mongoose thinks this doc is deleted.
Returns another Model instance.
model name
Removes this document from the db.
optional callback
Saves this document.
options optional options
optional callback
Sets subjects
to be a random matrix of AcademicSubjectDoc.name.
Generates at max Const.MaxSubjectTimesPerWeek entries of subject per week.
Does not corrupt state in case of an error. Does not write any changes to
the database. As it is a subdocument, it will be saved only with its
parent document.
Returns an AcademicSubjectDoc.name[], that denotes the list of today's subjets in schedule.
Generated using TypeDoc
Version using default version key. See http://mongoosejs.com/docs/guide.html#versionKey If you're using another key, you will have to access it using []: doc[_myVersionKey]