Class CoreService<Model, ModelType>Abstract

abstract class CoreService

  • common abstract to build user service

Abstract

Type Parameters

  • Model extends CoreModel<ModelType>

  • ModelType extends string

Hierarchy

Implements

Constructors

  • constructor

    Type Parameters

    • Model extends CoreModel<ModelType, Model>

    • ModelType extends string

    Parameters

    • Optional tableName: string

      target table-name (or .yml dummy file-name)

    • Optional ns: string

      namespace of dataset

    • Optional idName: string

      must be _id unless otherwise

    Returns CoreService<Model, ModelType>

Properties

DELIMITER: string
NS: string
current: number = 0

(optional) current timestamp

idName: string

global index name of elasticsearch

tableName: string

dynamo table name

Accessors

Methods

  • get key object w/ internal partition-key (default as _id).

    Parameters

    • type: ModelType

      type of model

    • id: string

      id of model in type

    Returns { _id: string; id: string; ns: string; type: ModelType }

    • _id: string
    • id: string
    • ns: string
    • type: ModelType

Generated using TypeDoc