# Class TimeSeriesModel<ChildClass>

#### Type Parameters

- #### ChildClass

#### Hierarchy (view full)

- RWSModel<TimeSeriesModel<ChildClass>>
  - TimeSeriesModel

- Defined in src/models/types/TimeSeriesModel.ts:3

#####
Index

### Constructors

constructor

### Properties

id
params
timestamp
value
_BANNED_KEYS
_collection

### Methods

_asyncFill
_fill
checkForInclusion
checkForInclusionWithThrow
delete
getCollection
hasTimeSeries
isDbVariable
loadModels
postCreate
postUpdate
preCreate
preUpdate
sanitizeDBData
save
toMongo
checkDbVariable
checkForInclusion
checkForInclusionWithThrow
checkTimeSeries
create
delete
find
findBy
findOneBy
getCollection
getModelAnnotations
isSubclass
loadModels
watchCollection

## Constructors

### constructor

- new TimeSeriesModel<ChildClass>(data?): TimeSeriesModel<ChildClass>

- #### Type Parameters

  - #### ChildClass

  #### Parameters

  - ##### `Optional` data: any

  #### Returns TimeSeriesModel<ChildClass>

  Overrides RWSModel.constructor

  - Defined in src/models/types/TimeSeriesModel.ts:13

## Properties

### id

id: string

Inherited from RWSModel.id

- Defined in src/models/_model.ts:38

### params

params: any

- Defined in src/models/types/TimeSeriesModel.ts:11

### timestamp

timestamp: Date

- Defined in src/models/types/TimeSeriesModel.ts:8

### value

value: number

- Defined in src/models/types/TimeSeriesModel.ts:5

### `Static` _BANNED_KEYS

_BANNED_KEYS: string[] = ...

Inherited from RWSModel._BANNED_KEYS

- Defined in src/models/_model.ts:41

### `Static` _collection

_collection: string = null

Inherited from RWSModel._collection

- Defined in src/models/_model.ts:39

## Methods

### _asyncFill

- _asyncFill(data): Promise<TimeSeriesModel<ChildClass>>

- #### Parameters

  - ##### data: any

  #### Returns Promise<TimeSeriesModel<ChildClass>>

  Inherited from RWSModel._asyncFill

  - Defined in src/models/_model.ts:105

### `Protected` _fill

- _fill(data): RWSModel<TimeSeriesModel<ChildClass>>

- #### Parameters

  - ##### data: any

  #### Returns RWSModel<TimeSeriesModel<ChildClass>>

  Inherited from RWSModel._fill

  - Defined in src/models/_model.ts:86

### checkForInclusion

- checkForInclusion(): boolean

- #### Returns boolean

  Inherited from RWSModel.checkForInclusion

  - Defined in src/models/_model.ts:74

### checkForInclusionWithThrow

- checkForInclusionWithThrow(): void

- #### Returns void

  Inherited from RWSModel.checkForInclusionWithThrow

  - Defined in src/models/_model.ts:62

### delete

- delete<ChildClass>(): Promise<void>

- #### Type Parameters

  - #### ChildClass extends RWSModel<ChildClass>

  #### Returns Promise<void>

  Inherited from RWSModel.delete

  - Defined in src/models/_model.ts:395

### getCollection

- getCollection(): string

- #### Returns string

  Inherited from RWSModel.getCollection

  - Defined in src/models/_model.ts:192

### hasTimeSeries

- hasTimeSeries(): boolean

- #### Returns boolean

  Inherited from RWSModel.hasTimeSeries

  - Defined in src/models/_model.ts:280

### isDbVariable

- isDbVariable(variable): boolean

- #### Parameters

  - ##### variable: string

  #### Returns boolean

  Inherited from RWSModel.isDbVariable

  - Defined in src/models/_model.ts:302

### loadModels

- loadModels(): RWSModel<any>[]

- #### Returns RWSModel<any>[]

  Inherited from RWSModel.loadModels

  - Defined in src/models/_model.ts:450

### postCreate

- postCreate(): void

- #### Returns void

  Inherited from RWSModel.postCreate

  - Defined in src/models/_model.ts:271

### postUpdate

- postUpdate(): void

- #### Returns void

  Inherited from RWSModel.postUpdate

  - Defined in src/models/_model.ts:261

### preCreate

- preCreate(): void

- #### Returns void

  Inherited from RWSModel.preCreate

  - Defined in src/models/_model.ts:266

### preUpdate

- preUpdate(): void

- #### Returns void

  Inherited from RWSModel.preUpdate

  - Defined in src/models/_model.ts:256

### sanitizeDBData

- sanitizeDBData(data): any

- #### Parameters

  - ##### data: any

  #### Returns any

  Inherited from RWSModel.sanitizeDBData

  - Defined in src/models/_model.ts:322

### save

- save(): Promise<TimeSeriesModel<ChildClass>>

- #### Returns Promise<TimeSeriesModel<ChildClass>>

  Inherited from RWSModel.save

  - Defined in src/models/_model.ts:201

### toMongo

- toMongo(): any

- #### Returns any

  Inherited from RWSModel.toMongo

  - Defined in src/models/_model.ts:167

### `Static` checkDbVariable

- checkDbVariable(constructor, variable): boolean

- #### Parameters

  - ##### constructor: any

  - ##### variable: string

  #### Returns boolean

  Inherited from RWSModel.checkDbVariable

  - Defined in src/models/_model.ts:307

### `Static` checkForInclusion

- checkForInclusion(this, checkModelType): boolean

- #### Parameters

  - ##### this: OpModelType<any>

  - ##### checkModelType: string

  #### Returns boolean

  Inherited from RWSModel.checkForInclusion

  - Defined in src/models/_model.ts:79

### `Static` checkForInclusionWithThrow

- checkForInclusionWithThrow(this, checkModelType): void

- #### Parameters

  - ##### this: OpModelType<any>

  - ##### checkModelType: string

  #### Returns void

  Inherited from RWSModel.checkForInclusionWithThrow

  - Defined in src/models/_model.ts:67

### `Static` checkTimeSeries

- checkTimeSeries(constructor): boolean

- #### Parameters

  - ##### constructor: any

  #### Returns boolean

  Inherited from RWSModel.checkTimeSeries

  - Defined in src/models/_model.ts:285

### `Static` create

- create<T>(this, data): Promise<T>

- #### Type Parameters

  - #### T extends RWSModel<T>

  #### Parameters

  - ##### this: (new () => T)

    - - new (): T

      - #### Returns T

  - ##### data: any

  #### Returns Promise<T>

  Inherited from RWSModel.create

  - Defined in src/models/_model.ts:434

### `Static` delete

- delete<ChildClass>(this, conditions): Promise<void>

- #### Type Parameters

  - #### ChildClass extends RWSModel<ChildClass>

  #### Parameters

  - ##### this: OpModelType<ChildClass>

  - ##### conditions: any

  #### Returns Promise<void>

  Inherited from RWSModel.delete

  - Defined in src/models/_model.ts:386

### `Static` find

- find<ChildClass>(this, id, fields?, ordering?): Promise<ChildClass>

- #### Type Parameters

  - #### ChildClass extends RWSModel<ChildClass>

  #### Parameters

  - ##### this: OpModelType<ChildClass>

  - ##### id: string

  - ##### fields: string[] = null

  - ##### ordering: {
    [fieldName: string]: string;
    } = null

    - ##### [fieldName: string]: string

  #### Returns Promise<ChildClass>

  Inherited from RWSModel.find

  - Defined in src/models/_model.ts:367

### `Static` findBy

- findBy<ChildClass>(this, conditions, fields?, ordering?): Promise<ChildClass[]>

- #### Type Parameters

  - #### ChildClass extends RWSModel<ChildClass>

  #### Parameters

  - ##### this: OpModelType<ChildClass>

  - ##### conditions: any

  - ##### fields: string[] = null

  - ##### ordering: {
    [fieldName: string]: string;
    } = null

    - ##### [fieldName: string]: string

  #### Returns Promise<ChildClass[]>

  Inherited from RWSModel.findBy

  - Defined in src/models/_model.ts:403

### `Static` findOneBy

- findOneBy<ChildClass>(this, conditions, fields?, ordering?): Promise<ChildClass>

- #### Type Parameters

  - #### ChildClass extends RWSModel<ChildClass>

  #### Parameters

  - ##### this: OpModelType<ChildClass>

  - ##### conditions: {
    [fieldName: string]: any;
    }

    - ##### [fieldName: string]: any

  - ##### fields: string[] = null

  - ##### ordering: {
    [fieldName: string]: string;
    } = null

    - ##### [fieldName: string]: string

  #### Returns Promise<ChildClass>

  Inherited from RWSModel.findOneBy

  - Defined in src/models/_model.ts:345

### `Static` getCollection

- getCollection(): string

- #### Returns string

  Inherited from RWSModel.getCollection

  - Defined in src/models/_model.ts:196

### `Static` getModelAnnotations

- getModelAnnotations<T>(constructor): Record<string, {
  annotationType: string;
  metadata: any;
  }>

- #### Type Parameters

  - #### T extends object

  #### Parameters

  - ##### constructor: (new () => T)

    - - new (): T

      - #### Returns T

  #### Returns Record<string, {
  annotationType: string;
  metadata: any;
  }>

  Inherited from RWSModel.getModelAnnotations

  - Defined in src/models/_model.ts:228

### `Static` isSubclass

- isSubclass<T, C>(constructor, baseClass): boolean

- #### Type Parameters

  - #### T extends RWSModel<T>

  - #### C extends (new () => T)

  #### Parameters

  - ##### constructor: C

  - ##### baseClass: (new () => T)

    - - new (): T

      - #### Returns T

  #### Returns boolean

  Inherited from RWSModel.isSubclass

  - Defined in src/models/_model.ts:276

### `Static` loadModels

- loadModels(): RWSModel<any>[]

- #### Returns RWSModel<any>[]

  Inherited from RWSModel.loadModels

  - Defined in src/models/_model.ts:444

### `Static` watchCollection

- watchCollection<ChildClass>(this, preRun): Promise<any>

- #### Type Parameters

  - #### ChildClass extends RWSModel<ChildClass>

  #### Parameters

  - ##### this: OpModelType<ChildClass>

  - ##### preRun: (() => void)

    - - (): void

      - #### Returns void

  #### Returns Promise<any>

  Inherited from RWSModel.watchCollection

  - Defined in src/models/_model.ts:336

Generated using TypeDoc