Chords model for MongoDB using Mongoose.
Defines the schema and virtual references for chords.
- Description:
- Chords model for MongoDB using Mongoose. Defines the schema and virtual references for chords.
- Source:
Methods
(static) chordSchema(fields, options)
- Description:
- chordSchema - Mongoose schema for chords.
- Source:
Properties:
Name | Type | Description |
---|---|---|
fields._id |
String | Custom ID for the chord. |
fields.noteId |
String | Reference to the Note schema. |
fields.typeId |
String | Reference to the ChordType schema. |
fields.notes |
Array.<Object> | Array of references to the Note schema. |
fields.name |
Object | Name of the chord in different languages. |
fields.images |
Object | Links to images of the chord. |
options._id |
boolean | Cancel automatic generation of "_id" field. |
options.toJSON |
Object | Options for JSON output. |
Parameters:
Name | Type | Description |
---|---|---|
fields |
Object | Options for the schema. |
options |
Object | Options for the schema. |
(static) setupNoteVirtual(note, options)
- Description:
- Virtual reference of 'noteId'
- Source:
Parameters:
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
note |
string | Name of the field to be referenced. | |||||||||||||||
options |
object | Options fot the virtual reference.
Properties
|
(static) setupTypeVirtual(note, options)
- Description:
- Virtual reference of 'noteId'
- Source:
Parameters:
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
note |
string | Name of the field to be referenced. | |||||||||||||||
options |
object | Options fot the virtual reference.
Properties
|