Model reports


Permissions

User GroupCreate?Read?Update?Delete?
adminxxxx
ownerxxxx
userx
all

Fields

NameTypeLinkMaps ToDefaultIndexed?Unique?Required?
__vNumber
_deletedBooleanfalsex
_idObjectID[Function]
_owner_idObjectIDUser_ownerx
_updated_by_idObjectIDUser_updated_byx
chartsArray[Function]
createdAtDate
created_atDate[Function]
created_byObjectIDuser
descriptionString
is_publicBooleanfalse
nameStringxx
scheduleEmbedded
typeStringcustomx
updatedAtDate
updated_atDate[Function]

Field Details

__v

{
  "path": "__v",
  "instance": "Number",
  "options": {},
  "validators": []
}

_deleted

{
  "path": "_deleted",
  "instance": "Boolean",
  "options": {
    "default": false,
    "index": true
  },
  "validators": [],
  "defaultValue": false
}

_id

{
  "path": "_id",
  "instance": "ObjectID",
  "options": {
    "auto": true,
    "type": "ObjectId"
  },
  "validators": [],
  "defaultValue": "[Function]"
}

_owner_id

{
  "path": "_owner_id",
  "instance": "ObjectID",
  "options": {
    "link": "User",
    "map_to": "_owner",
    "index": true
  },
  "validators": []
}

_updated_by_id

{
  "path": "_updated_by_id",
  "instance": "ObjectID",
  "options": {
    "link": "User",
    "map_to": "_updated_by",
    "index": true
  },
  "validators": []
}

charts

{
  "path": "charts",
  "instance": "Array",
  "options": {
    "type": [
      {
        "obj": {
          "_deleted": {
            "default": false,
            "index": true
          },
          "_owner_id": {
            "link": "User",
            "map_to": "_owner",
            "index": true
          },
          "_updated_by_id": {
            "link": "User",
            "map_to": "_updated_by",
            "index": true
          },
          "chart_id": {
            "link": "Saved_Chart"
          }
        },
        "paths": {
          "_deleted": {
            "path": "_deleted",
            "instance": "Boolean",
            "validators": [],
            "getters": [],
            "setters": [],
            "_presplitPath": [
              "_deleted"
            ],
            "options": {
              "default": false,
              "index": true
            },
            "_index": true,
            "defaultValue": false,
            "$isUnderneathDocArray": true
          },
          "_owner_id": {
            "path": "_owner_id",
            "instance": "ObjectID",
            "validators": [],
            "getters": [],
            "setters": [],
            "_presplitPath": [
              "_owner_id"
            ],
            "options": {
              "link": "User",
              "map_to": "_owner",
              "index": true
            },
            "_index": true,
            "$isUnderneathDocArray": true
          },
          "_updated_by_id": {
            "path": "_updated_by_id",
            "instance": "ObjectID",
            "validators": [],
            "getters": [],
            "setters": [],
            "_presplitPath": [
              "_updated_by_id"
            ],
            "options": {
              "link": "User",
              "map_to": "_updated_by",
              "index": true
            },
            "_index": true,
            "$isUnderneathDocArray": true
          },
          "chart_id": {
            "path": "chart_id",
            "instance": "ObjectID",
            "validators": [],
            "getters": [],
            "setters": [],
            "_presplitPath": [
              "chart_id"
            ],
            "options": {
              "link": "Saved_Chart"
            },
            "_index": null,
            "$isUnderneathDocArray": true
          },
          "col": {
            "path": "col",
            "instance": "Number",
            "validators": [],
            "getters": [],
            "setters": [],
            "_presplitPath": [
              "col"
            ],
            "options": {},
            "_index": null,
            "$isUnderneathDocArray": true
          },
          "row": {
            "path": "row",
            "instance": "Number",
            "validators": [],
            "getters": [],
            "setters": [],
            "_presplitPath": [
              "row"
            ],
            "options": {},
            "_index": null,
            "$isUnderneathDocArray": true
          },
          "colspan": {
            "path": "colspan",
            "instance": "Number",
            "validators": [],
            "getters": [],
            "setters": [],
            "_presplitPath": [
              "colspan"
            ],
            "options": {},
            "_index": null,
            "$isUnderneathDocArray": true
          },
          "rowspan": {
            "path": "rowspan",
            "instance": "Number",
            "validators": [],
            "getters": [],
            "setters": [],
            "_presplitPath": [
              "rowspan"
            ],
            "options": {},
            "_index": null,
            "$isUnderneathDocArray": true
          },
          "_id": {
            "path": "_id",
            "instance": "ObjectID",
            "validators": [],
            "getters": [],
            "setters": [
              null
            ],
            "_presplitPath": [
              "_id"
            ],
            "options": {
              "auto": true,
              "type": "ObjectId"
            },
            "_index": null,
            "$isUnderneathDocArray": true
          },
          "createdAt": {
            "path": "createdAt",
            "instance": "Date",
            "validators": [],
            "getters": [],
            "setters": [
              null,
              null
            ],
            "_presplitPath": [
              "createdAt"
            ],
            "options": {
              "immutable": true
            },
            "_index": null,
            "$immutable": true,
            "$isUnderneathDocArray": true
          },
          "updatedAt": {
            "path": "updatedAt",
            "instance": "Date",
            "validators": [],
            "getters": [],
            "setters": [],
            "_presplitPath": [
              "updatedAt"
            ],
            "options": {},
            "_index": null,
            "$isUnderneathDocArray": true
          }
        },
        "aliases": {},
        "subpaths": {},
        "virtuals": {
          "_owner": {
            "path": "_owner",
            "getters": [],
            "setters": [
              null
            ],
            "options": {
              "ref": "User",
              "localField": "_owner_id",
              "foreignField": "_id",
              "justOne": true,
              "options": {}
            }
          },
          "_updated_by": {
            "path": "_updated_by",
            "getters": [],
            "setters": [
              null
            ],
            "options": {
              "ref": "User",
              "localField": "_updated_by_id",
              "foreignField": "_id",
              "justOne": true,
              "options": {}
            }
          },
          "saved_chart": {
            "path": "saved_chart",
            "getters": [],
            "setters": [
              null
            ],
            "options": {
              "ref": "Saved_Chart",
              "localField": "chart_id",
              "foreignField": "_id",
              "justOne": true,
              "options": {}
            }
          },
          "id": {
            "path": "id",
            "getters": [
              null
            ],
            "setters": [],
            "options": {}
          }
        },
        "singleNestedPaths": {},
        "nested": {},
        "inherits": {},
        "callQueue": [],
        "_indexes": [
          [
            {
              "createdAt": -1
            },
            {}
          ],
          [
            {
              "updatedAt": -1
            },
            {}
          ]
        ],
        "methods": {},
        "methodOptions": {},
        "statics": {},
        "tree": {
          "_deleted": {
            "default": false,
            "index": true
          },
          "_owner_id": {
            "link": "User",
            "map_to": "_owner",
            "index": true
          },
          "_updated_by_id": {
            "link": "User",
            "map_to": "_updated_by",
            "index": true
          },
          "chart_id": {
            "link": "Saved_Chart"
          },
          "_id": {
            "auto": true,
            "type": "ObjectId"
          },
          "createdAt": {
            "immutable": true
          },
          "_owner": {
            "path": "_owner",
            "getters": [],
            "setters": [
              null
            ],
            "options": {
              "ref": "User",
              "localField": "_owner_id",
              "foreignField": "_id",
              "justOne": true,
              "options": {}
            }
          },
          "_updated_by": {
            "path": "_updated_by",
            "getters": [],
            "setters": [
              null
            ],
            "options": {
              "ref": "User",
              "localField": "_updated_by_id",
              "foreignField": "_id",
              "justOne": true,
              "options": {}
            }
          },
          "saved_chart": {
            "path": "saved_chart",
            "getters": [],
            "setters": [
              null
            ],
            "options": {
              "ref": "Saved_Chart",
              "localField": "chart_id",
              "foreignField": "_id",
              "justOne": true,
              "options": {}
            }
          },
          "id": {
            "path": "id",
            "getters": [
              null
            ],
            "setters": [],
            "options": {}
          }
        },
        "query": {},
        "childSchemas": [],
        "plugins": [
          {
            "opts": {
              "deduplicate": true
            }
          },
          {
            "opts": {
              "deduplicate": true
            }
          },
          {
            "opts": {
              "deduplicate": true
            }
          },
          {
            "opts": {
              "deduplicate": true
            }
          },
          {
            "opts": {
              "deduplicate": true
            }
          }
        ],
        "$id": 37,
        "mapPaths": [],
        "s": {
          "hooks": {
            "_pres": {},
            "_posts": {}
          }
        },
        "_userProvidedOptions": {
          "timestamps": true,
          "toJSON": {
            "virtuals": true
          },
          "toObject": {
            "virtuals": true
          },
          "_perms": {
            "admin": "",
            "owner": "",
            "user": "",
            "all": ""
          }
        },
        "options": {
          "timestamps": true,
          "toJSON": {
            "virtuals": true
          },
          "toObject": {
            "virtuals": true
          },
          "typeKey": "type",
          "id": true,
          "_id": true,
          "validateBeforeSave": true,
          "read": null,
          "shardKey": null,
          "discriminatorKey": "__t",
          "autoIndex": null,
          "minimize": true,
          "optimisticConcurrency": false,
          "versionKey": "__v",
          "capped": false,
          "bufferCommands": true,
          "strictQuery": true,
          "strict": true,
          "_perms": {
            "admin": "",
            "owner": "",
            "user": "",
            "all": ""
          }
        },
        "$timestamps": {
          "createdAt": "createdAt",
          "updatedAt": "updatedAt"
        },
        "opts": {
          "timestamps": true,
          "toJSON": {
            "virtuals": true
          },
          "toObject": {
            "virtuals": true
          }
        },
        "definition": {
          "_deleted": {
            "default": false,
            "index": true
          },
          "_owner_id": {
            "link": "User",
            "map_to": "_owner",
            "index": true
          },
          "_updated_by_id": {
            "link": "User",
            "map_to": "_updated_by",
            "index": true
          },
          "chart_id": {
            "link": "Saved_Chart"
          }
        },
        "$globalPluginsApplied": true
      }
    ]
  },
  "validators": [],
  "defaultValue": "[Function]"
}

createdAt

{
  "path": "createdAt",
  "instance": "Date",
  "options": {
    "immutable": true
  },
  "validators": []
}

created_at

{
  "path": "created_at",
  "instance": "Date",
  "options": {},
  "validators": [],
  "defaultValue": "[Function]"
}

created_by

{
  "path": "created_by",
  "instance": "ObjectID",
  "options": {
    "link": "user"
  },
  "validators": []
}

description

{
  "path": "description",
  "instance": "String",
  "options": {},
  "validators": []
}

is_public

{
  "path": "is_public",
  "instance": "Boolean",
  "options": {
    "default": false
  },
  "validators": [],
  "defaultValue": false
}

name

{
  "path": "name",
  "instance": "String",
  "options": {
    "required": true,
    "index": true
  },
  "validators": [
    {
      "message": "Path `{PATH}` is required."
    }
  ],
  "isRequired": true
}

Validators

schedule

{
  "path": "schedule",
  "instance": "Embedded",
  "options": {
    "type": {
      "obj": {
        "_deleted": {
          "default": false,
          "index": true
        },
        "_owner_id": {
          "link": "User",
          "map_to": "_owner",
          "index": true
        },
        "_updated_by_id": {
          "link": "User",
          "map_to": "_updated_by",
          "index": true
        },
        "frequency": {
          "enum": [
            "daily",
            "weekly",
            "monthly",
            "quarterly"
          ]
        },
        "recipients": [
          null
        ],
        "format": {
          "enum": [
            "pdf",
            "excel",
            "csv"
          ]
        }
      },
      "paths": {
        "_deleted": {
          "path": "_deleted",
          "instance": "Boolean",
          "validators": [],
          "getters": [],
          "setters": [],
          "_presplitPath": [
            "_deleted"
          ],
          "options": {
            "default": false,
            "index": true
          },
          "_index": true,
          "defaultValue": false
        },
        "_owner_id": {
          "path": "_owner_id",
          "instance": "ObjectID",
          "validators": [],
          "getters": [],
          "setters": [],
          "_presplitPath": [
            "_owner_id"
          ],
          "options": {
            "link": "User",
            "map_to": "_owner",
            "index": true
          },
          "_index": true
        },
        "_updated_by_id": {
          "path": "_updated_by_id",
          "instance": "ObjectID",
          "validators": [],
          "getters": [],
          "setters": [],
          "_presplitPath": [
            "_updated_by_id"
          ],
          "options": {
            "link": "User",
            "map_to": "_updated_by",
            "index": true
          },
          "_index": true
        },
        "frequency": {
          "enumValues": [
            "daily",
            "weekly",
            "monthly",
            "quarterly"
          ],
          "regExp": null,
          "path": "frequency",
          "instance": "String",
          "validators": [
            {
              "message": "`{VALUE}` is not a valid enum value for path `{PATH}`.",
              "type": "enum",
              "enumValues": [
                "daily",
                "weekly",
                "monthly",
                "quarterly"
              ]
            }
          ],
          "getters": [],
          "setters": [],
          "_presplitPath": [
            "frequency"
          ],
          "options": {
            "enum": [
              "daily",
              "weekly",
              "monthly",
              "quarterly"
            ]
          },
          "_index": null
        },
        "dayOfWeek": {
          "path": "dayOfWeek",
          "instance": "Number",
          "validators": [],
          "getters": [],
          "setters": [],
          "_presplitPath": [
            "dayOfWeek"
          ],
          "options": {},
          "_index": null
        },
        "dayOfMonth": {
          "path": "dayOfMonth",
          "instance": "Number",
          "validators": [],
          "getters": [],
          "setters": [],
          "_presplitPath": [
            "dayOfMonth"
          ],
          "options": {},
          "_index": null
        },
        "time": {
          "enumValues": [],
          "regExp": null,
          "path": "time",
          "instance": "String",
          "validators": [],
          "getters": [],
          "setters": [],
          "_presplitPath": [
            "time"
          ],
          "options": {},
          "_index": null
        },
        "recipients": {
          "schemaOptions": {
            "timestamps": true,
            "toJSON": {
              "virtuals": true
            },
            "toObject": {
              "virtuals": true
            },
            "typeKey": "type",
            "id": true,
            "_id": true,
            "validateBeforeSave": true,
            "read": null,
            "shardKey": null,
            "discriminatorKey": "__t",
            "autoIndex": null,
            "minimize": true,
            "optimisticConcurrency": false,
            "versionKey": "__v",
            "capped": false,
            "bufferCommands": true,
            "strictQuery": true,
            "strict": true,
            "_perms": {
              "admin": "",
              "owner": "",
              "user": "",
              "all": ""
            }
          },
          "caster": {
            "enumValues": [],
            "regExp": null,
            "path": "recipients",
            "instance": "String",
            "validators": [],
            "getters": [],
            "setters": [],
            "_presplitPath": [
              "recipients"
            ],
            "options": {},
            "_index": null,
            "_arrayPath": "recipients.$",
            "_arrayParentPath": "recipients"
          },
          "$embeddedSchemaType": {
            "enumValues": [],
            "regExp": null,
            "path": "recipients",
            "instance": "String",
            "validators": [],
            "getters": [],
            "setters": [],
            "_presplitPath": [
              "recipients"
            ],
            "options": {},
            "_index": null,
            "_arrayPath": "recipients.$",
            "_arrayParentPath": "recipients"
          },
          "$isMongooseArray": true,
          "path": "recipients",
          "instance": "Array",
          "validators": [],
          "getters": [],
          "setters": [],
          "_presplitPath": [
            "recipients"
          ],
          "options": {
            "type": [
              null
            ]
          },
          "_index": null
        },
        "format": {
          "enumValues": [
            "pdf",
            "excel",
            "csv"
          ],
          "regExp": null,
          "path": "format",
          "instance": "String",
          "validators": [
            {
              "message": "`{VALUE}` is not a valid enum value for path `{PATH}`.",
              "type": "enum",
              "enumValues": [
                "pdf",
                "excel",
                "csv"
              ]
            }
          ],
          "getters": [],
          "setters": [],
          "_presplitPath": [
            "format"
          ],
          "options": {
            "enum": [
              "pdf",
              "excel",
              "csv"
            ]
          },
          "_index": null
        },
        "_id": {
          "path": "_id",
          "instance": "ObjectID",
          "validators": [],
          "getters": [],
          "setters": [
            null
          ],
          "_presplitPath": [
            "_id"
          ],
          "options": {
            "auto": true,
            "type": "ObjectId"
          },
          "_index": null
        },
        "createdAt": {
          "path": "createdAt",
          "instance": "Date",
          "validators": [],
          "getters": [],
          "setters": [
            null,
            null
          ],
          "_presplitPath": [
            "createdAt"
          ],
          "options": {
            "immutable": true
          },
          "_index": null,
          "$immutable": true
        },
        "updatedAt": {
          "path": "updatedAt",
          "instance": "Date",
          "validators": [],
          "getters": [],
          "setters": [],
          "_presplitPath": [
            "updatedAt"
          ],
          "options": {},
          "_index": null
        }
      },
      "aliases": {},
      "subpaths": {
        "recipients.$": {
          "enumValues": [],
          "regExp": null,
          "path": "recipients.$",
          "instance": "String",
          "validators": [],
          "getters": [],
          "setters": [],
          "_presplitPath": [
            "recipients"
          ],
          "options": {},
          "_index": null
        }
      },
      "virtuals": {
        "_owner": {
          "path": "_owner",
          "getters": [],
          "setters": [
            null
          ],
          "options": {
            "ref": "User",
            "localField": "_owner_id",
            "foreignField": "_id",
            "justOne": true,
            "options": {}
          }
        },
        "_updated_by": {
          "path": "_updated_by",
          "getters": [],
          "setters": [
            null
          ],
          "options": {
            "ref": "User",
            "localField": "_updated_by_id",
            "foreignField": "_id",
            "justOne": true,
            "options": {}
          }
        },
        "id": {
          "path": "id",
          "getters": [
            null
          ],
          "setters": [],
          "options": {}
        }
      },
      "singleNestedPaths": {},
      "nested": {},
      "inherits": {},
      "callQueue": [],
      "_indexes": [
        [
          {
            "createdAt": -1
          },
          {}
        ],
        [
          {
            "updatedAt": -1
          },
          {}
        ]
      ],
      "methods": {},
      "methodOptions": {},
      "statics": {},
      "tree": {
        "_deleted": {
          "default": false,
          "index": true
        },
        "_owner_id": {
          "link": "User",
          "map_to": "_owner",
          "index": true
        },
        "_updated_by_id": {
          "link": "User",
          "map_to": "_updated_by",
          "index": true
        },
        "frequency": {
          "enum": [
            "daily",
            "weekly",
            "monthly",
            "quarterly"
          ]
        },
        "recipients": [
          null
        ],
        "format": {
          "enum": [
            "pdf",
            "excel",
            "csv"
          ]
        },
        "_id": {
          "auto": true,
          "type": "ObjectId"
        },
        "createdAt": {
          "immutable": true
        },
        "_owner": {
          "path": "_owner",
          "getters": [],
          "setters": [
            null
          ],
          "options": {
            "ref": "User",
            "localField": "_owner_id",
            "foreignField": "_id",
            "justOne": true,
            "options": {}
          }
        },
        "_updated_by": {
          "path": "_updated_by",
          "getters": [],
          "setters": [
            null
          ],
          "options": {
            "ref": "User",
            "localField": "_updated_by_id",
            "foreignField": "_id",
            "justOne": true,
            "options": {}
          }
        },
        "id": {
          "path": "id",
          "getters": [
            null
          ],
          "setters": [],
          "options": {}
        }
      },
      "query": {},
      "childSchemas": [],
      "plugins": [
        {
          "opts": {
            "deduplicate": true
          }
        },
        {
          "opts": {
            "deduplicate": true
          }
        },
        {
          "opts": {
            "deduplicate": true
          }
        },
        {
          "opts": {
            "deduplicate": true
          }
        },
        {
          "opts": {
            "deduplicate": true
          }
        }
      ],
      "$id": 39,
      "mapPaths": [],
      "s": {
        "hooks": {
          "_pres": {},
          "_posts": {}
        }
      },
      "_userProvidedOptions": {
        "timestamps": true,
        "toJSON": {
          "virtuals": true
        },
        "toObject": {
          "virtuals": true
        },
        "_perms": {
          "admin": "",
          "owner": "",
          "user": "",
          "all": ""
        }
      },
      "options": {
        "timestamps": true,
        "toJSON": {
          "virtuals": true
        },
        "toObject": {
          "virtuals": true
        },
        "typeKey": "type",
        "id": true,
        "_id": true,
        "validateBeforeSave": true,
        "read": null,
        "shardKey": null,
        "discriminatorKey": "__t",
        "autoIndex": null,
        "minimize": true,
        "optimisticConcurrency": false,
        "versionKey": "__v",
        "capped": false,
        "bufferCommands": true,
        "strictQuery": true,
        "strict": true,
        "_perms": {
          "admin": "",
          "owner": "",
          "user": "",
          "all": ""
        }
      },
      "$timestamps": {
        "createdAt": "createdAt",
        "updatedAt": "updatedAt"
      },
      "opts": {
        "timestamps": true,
        "toJSON": {
          "virtuals": true
        },
        "toObject": {
          "virtuals": true
        }
      },
      "definition": {
        "_deleted": {
          "default": false,
          "index": true
        },
        "_owner_id": {
          "link": "User",
          "map_to": "_owner",
          "index": true
        },
        "_updated_by_id": {
          "link": "User",
          "map_to": "_updated_by",
          "index": true
        },
        "frequency": {
          "enum": [
            "daily",
            "weekly",
            "monthly",
            "quarterly"
          ]
        },
        "recipients": [
          null
        ],
        "format": {
          "enum": [
            "pdf",
            "excel",
            "csv"
          ]
        }
      },
      "$globalPluginsApplied": true
    }
  },
  "validators": [],
  "schema": [
    {
      "path": "_deleted",
      "type": "Boolean"
    },
    {
      "path": "_owner_id",
      "type": "ObjectID"
    },
    {
      "path": "_updated_by_id",
      "type": "ObjectID"
    },
    {
      "path": "frequency",
      "type": "String"
    },
    {
      "path": "dayOfWeek",
      "type": "Number"
    },
    {
      "path": "dayOfMonth",
      "type": "Number"
    },
    {
      "path": "time",
      "type": "String"
    },
    {
      "path": "recipients",
      "type": "Array"
    },
    {
      "path": "format",
      "type": "String"
    },
    {
      "path": "_id",
      "type": "ObjectID"
    },
    {
      "path": "createdAt",
      "type": "Date"
    },
    {
      "path": "updatedAt",
      "type": "Date"
    }
  ]
}

Nested Schema

type

{
  "path": "type",
  "instance": "String",
  "options": {
    "enum": [
      "reader",
      "revenue",
      "engagement",
      "segmentation",
      "custom"
    ],
    "default": "custom",
    "index": true
  },
  "validators": [
    {
      "message": "`{VALUE}` is not a valid enum value for path `{PATH}`."
    }
  ],
  "defaultValue": "custom"
}

Validators

updatedAt

{
  "path": "updatedAt",
  "instance": "Date",
  "options": {},
  "validators": []
}

updated_at

{
  "path": "updated_at",
  "instance": "Date",
  "options": {},
  "validators": [],
  "defaultValue": "[Function]"
}