Skip to main content
Version: 5.2

abstractBaseEntity <T, PK, P>

Implements

Index

Constructors

constructor

  • Type parameters

    • T
    • PK: string | number | symbol
    • P: string = never

    Returns BaseEntity<T, PK, P>

Methods

assign

getSchema

  • getSchema(): undefined | string
  • Returns undefined | string

init

  • init<P>(populated?: boolean): Promise<Loaded<T, P>>
  • Type parameters

    • P: string = never

    Parameters

    • populated: boolean = true

    Returns Promise<Loaded<T, P>>

isInitialized

  • isInitialized(): boolean
  • Returns boolean

isTouched

  • isTouched(): boolean
  • Returns boolean

populated

  • populated(populated?: boolean): void
  • Parameters

    • populated: boolean = true

    Returns void

setSchema

  • setSchema(schema?: string): void
  • Parameters

    • optionalschema: string

    Returns void

toJSON

  • Parameters

    • rest...args: any[]

    Returns EntityDTO<T>

toObject

  • toObject(ignoreFields?: string[]): EntityDTO<T>
  • Parameters

    • ignoreFields: string[] = []

    Returns EntityDTO<T>

toPOJO

  • Returns EntityDTO<T>

toReference

  • toReference(): any
  • Returns any