Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface LogsDocument

A suggestion for a mongo log document.

Hierarchy

  • Document
    • LogsDocument

Index

Properties

Optional __v

__v: number

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]

base

base: typeof mongoose

Base Mongoose instance the model uses.

baseModelName

baseModelName: string | undefined

If this is a discriminator model, baseModelName is the name of the base model.

collection

collection: Collection

Collection the model uses.

created

created: Date

The time, the entry has been created.

db

db: Connection

Connection the model uses.

discriminators

discriminators: any

Registered discriminators for this model.

Optional id

id: any

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.

message

message: string

The message.

modelName

modelName: string

The name of the model

Optional payload

payload: string

The optional payload.

schema

schema: Schema

Schema the model uses.

type

type: number

The type.

Optional updated

updated: Date

The time, the entry has been updated.

uuid

uuid: string

The UUID of the entry.

Methods

$isDeleted

  • $isDeleted(isDeleted: boolean): void
  • $isDeleted(): boolean
  • Override whether mongoose thinks this doc is deleted or not

    Parameters

    • isDeleted: boolean

    Returns void

  • whether mongoose thinks this doc is deleted.

    Returns boolean

addListener

  • addListener(event: string | symbol, listener: (...args: any[]) => void): this
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

emit

  • emit(event: string | symbol, ...args: any[]): boolean
  • Parameters

    • event: string | symbol
    • Rest ...args: any[]

    Returns boolean

eventNames

  • eventNames(): Array<string | symbol>
  • Returns Array<string | symbol>

getMaxListeners

  • getMaxListeners(): number

increment

  • increment(): this
  • Signal that we desire an increment of this documents version.

    Returns this

listenerCount

  • listenerCount(type: string | symbol): number
  • Parameters

    • type: string | symbol

    Returns number

listeners

  • listeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

model

  • model<T>(name: string): Model<T>
  • Returns another Model instance.

    Type parameters

    • T: Document

    Parameters

    • name: string

      model name

    Returns Model<T>

off

  • off(event: string | symbol, listener: (...args: any[]) => void): this
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

on

  • on(event: string | symbol, listener: (...args: any[]) => void): this
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

once

  • once(event: string | symbol, listener: (...args: any[]) => void): this
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

prependListener

  • prependListener(event: string | symbol, listener: (...args: any[]) => void): this
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

rawListeners

  • rawListeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

remove

  • remove(fn?: (err: any, product: this) => void): Promise<this>
  • Removes this document from the db.

    Parameters

    • Optional fn: (err: any, product: this) => void

      optional callback

        • (err: any, product: this): void
        • Parameters

          • err: any
          • product: this

          Returns void

    Returns Promise<this>

removeAllListeners

  • removeAllListeners(event?: string | symbol): this
  • Parameters

    • Optional event: string | symbol

    Returns this

removeListener

  • removeListener(event: string | symbol, listener: (...args: any[]) => void): this
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

save

  • save(options?: SaveOptions, fn?: (err: any, product: this) => void): Promise<this>
  • save(fn?: (err: any, product: this) => void): Promise<this>
  • Saves this document.

    Parameters

    • Optional options: SaveOptions

      options optional options

    • Optional fn: (err: any, product: this) => void

      optional callback

        • (err: any, product: this): void
        • Parameters

          • err: any
          • product: this

          Returns void

    Returns Promise<this>

  • Parameters

    • Optional fn: (err: any, product: this) => void
        • (err: any, product: this): void
        • Parameters

          • err: any
          • product: this

          Returns void

    Returns Promise<this>

setMaxListeners

  • setMaxListeners(n: number): this

Generated using TypeDoc