# GuaribasConversationMessage | botserver

### Hierarchy

- Model< GuaribasConversationMessage >
  - GuaribasConversationMessage

## Index

### Constructors

- constructor

### Properties

- Model
- content
- conversation
- conversationId
- conversationMessageId
- createdAt
- dataValues
- deletedAt
- id
- instanceId
- isNewRecord
- sequelize
- subjectId
- updatedAt
- user
- userId
- version
- associations
- attributes
- isInitialized
- primaryKeyAttribute
- primaryKeyAttributes
- rawAttributes
- sequelize

### Methods

- $add
- $count
- $create
- $get
- $has
- $remove
- $set
- changed
- decrement
- destroy
- equals
- equalsOneOf
- get
- getDataValue
- increment
- previous
- reload
- restore
- save
- set
- setAttributes
- setDataValue
- toJSON
- update
- updateAttributes
- validate
- where
- addHook
- addScope
- afterBulkCreate
- afterBulkDelete
- afterBulkDestroy
- afterBulkSync
- afterBulkUpdate
- afterCreate
- afterDefine
- afterDelete
- afterDestroy
- afterFind
- afterInit
- afterSync
- afterUpdate
- afterValidate
- aggregate
- all
- beforeBulkCreate
- beforeBulkDelete
- beforeBulkDestroy
- beforeBulkSync
- beforeBulkUpdate
- beforeCreate
- beforeDefine
- beforeDelete
- beforeDestroy
- beforeFind
- beforeFindAfterExpandIncludeAll
- beforeFindAfterOptions
- beforeInit
- beforeSync
- beforeUpdate
- beforeValidate
- build
- bulkBuild
- bulkCreate
- count
- create
- describe
- destroy
- drop
- find
- findAll
- findAndCount
- findAndCountAll
- findById
- findByPrimary
- findCreateFind
- findOne
- findOrBuild
- findOrCreate
- findOrInitialize
- getTableName
- hasHook
- hasHooks
- hook
- increment
- insertOrUpdate
- max
- min
- removeAttribute
- removeHook
- restore
- schema
- scope
- sum
- sync
- truncate
- unscoped
- update
- upsert

## Constructors

### constructor

- new GuaribasConversationMessage(values?: FilteredModelAttributes< GuaribasConversationMessage >, options?: IBuildOptions): GuaribasConversationMessage

- Inherited from Model.__constructor

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:37

  #### Parameters

  - ##### Optional values: FilteredModelAttributes< GuaribasConversationMessage >

  - ##### Optional options: IBuildOptions

  #### Returns GuaribasConversationMessage

## Properties

### Model

Model: Model<this>

Inherited from Model.Model

- Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:533

Returns the Model the instance was created from.

see

  Model

### content

content: string

- Defined in deploy/analytics.gblib/models/index.ts:119

### conversation

conversation: GuaribasConversation

- Defined in deploy/analytics.gblib/models/index.ts:134

### conversationId

conversationId: number

- Defined in deploy/analytics.gblib/models/index.ts:131

### conversationMessageId

conversationMessageId: number

- Defined in deploy/analytics.gblib/models/index.ts:112

### createdAt

createdAt: Date

Overrides Model.createdAt

- Defined in deploy/analytics.gblib/models/index.ts:123

### dataValues

dataValues: FilteredModelAttributes<this>

Inherited from Model.dataValues

- Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:460

### Optional deletedAt

deletedAt: Date | any

Inherited from Model.deletedAt

- Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:516

deletedAt timestamps automatically created by sequelize if paranoid is true

### Optional id

id: number | any

Inherited from Model.id

- Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:501

Default id automatically created by sequelize

### instanceId

instanceId: number

- Defined in deploy/analytics.gblib/models/index.ts:138

### isNewRecord

isNewRecord: boolean

Inherited from Model.isNewRecord

- Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:526

Returns true if this instance has not yet been persisted to the database

### sequelize

sequelize: Sequelize

Inherited from Model.sequelize

- Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:538

A reference to the sequelize instance

### subjectId

subjectId: number

- Defined in deploy/analytics.gblib/models/index.ts:116

### updatedAt

updatedAt: Date

Overrides Model.updatedAt

- Defined in deploy/analytics.gblib/models/index.ts:127

### user

user: GuaribasUser

- Defined in deploy/analytics.gblib/models/index.ts:145

### userId

userId: number

- Defined in deploy/analytics.gblib/models/index.ts:142

### Optional version

version: number | any

Inherited from Model.version

- Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:521

version number automatically created by sequelize if table options.version is true

### Static Optional associations

associations: object

Inherited from Model.associations

- Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:48

#### Type declaration

- ##### [key: string]: any

### Static attributes

attributes: object

Inherited from Model.attributes

- Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:43

#### Type declaration

- ##### [key: string]: IPartialDefineAttributeColumnOptions

### Static isInitialized

isInitialized: boolean

Inherited from Model.isInitialized

- Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:46

### Static primaryKeyAttribute

primaryKeyAttribute: string

Inherited from Model.primaryKeyAttribute

- Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:42

### Static primaryKeyAttributes

primaryKeyAttributes: string[]

Inherited from Model.primaryKeyAttributes

- Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:41

### Static rawAttributes

rawAttributes: object

Inherited from Model.rawAttributes

- Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:44

#### Type declaration

- ##### [key: string]: IPartialDefineAttributeColumnOptions

### Static sequelize

sequelize: Sequelize

Inherited from Model.sequelize

- Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:457

A reference to the sequelize instance

## Methods

### $add

- $add<R>(propertyKey: string, instances: R | R[] | string[] | string | number[] | number, options?: IAssociationActionOptions): Promise<this>

- Inherited from Model.$add

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:465

  Adds relation between specified instances and source instance

  #### Type parameters

  - #### R: Model<R>

  #### Parameters

  - ##### propertyKey: string

  - ##### instances: R | R[] | string[] | string | number[] | number

  - ##### Optional options: IAssociationActionOptions

  #### Returns Promise<this>

### $count

- $count(propertyKey: string, options?: any): Promise<number>

- Inherited from Model.$count

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:481

  Counts related instances (specified by propertyKey) of source instance

  #### Parameters

  - ##### propertyKey: string

  - ##### Optional options: any

  #### Returns Promise<number>

### $create

- $create<R>(propertyKey: string, values: any, options?: IAssociationActionOptions): Promise<R | this>

- Inherited from Model.$create

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:486

  Creates instances and relate them to source instance

  #### Type parameters

  - #### R: Model<R>

  #### Parameters

  - ##### propertyKey: string

  - ##### values: any

  - ##### Optional options: IAssociationActionOptions

  #### Returns Promise<R | this>

### $get

- $get<R>(propertyKey: string, options?: any): Promise<R | R[]>

- Inherited from Model.$get

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:476

  Returns related instance (specified by propertyKey) of source instance

  #### Type parameters

  - #### R: Model<R>

  #### Parameters

  - ##### propertyKey: string

  - ##### Optional options: any

  #### Returns Promise<R | R[]>

### $has

- $has<R>(propertyKey: string, instances: R | R[] | string[] | string | number[] | number, options?: any): Promise<this>

- Inherited from Model.$has

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:491

  Checks if specified instances is related to source instance

  #### Type parameters

  - #### R: Model<R>

  #### Parameters

  - ##### propertyKey: string

  - ##### instances: R | R[] | string[] | string | number[] | number

  - ##### Optional options: any

  #### Returns Promise<this>

### $remove

- $remove<R>(propertyKey: string, instances: R | R[] | string[] | string | number[] | number, options?: any): Promise<this>

- Inherited from Model.$remove

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:496

  Removes specified instances from source instance

  #### Type parameters

  - #### R: Model<R>

  #### Parameters

  - ##### propertyKey: string

  - ##### instances: R | R[] | string[] | string | number[] | number

  - ##### Optional options: any

  #### Returns Promise<this>

### $set

- $set<R>(propertyKey: string, instances: R | R[] | string[] | string | number[] | number, options?: IAssociationActionOptions): Promise<this>

- Inherited from Model.$set

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:471

  Sets relation between specified instances and source instance (replaces old relations)

  #### Type parameters

  - #### R: Model<R>

  #### Parameters

  - ##### propertyKey: string

  - ##### instances: R | R[] | string[] | string | number[] | number

  - ##### Optional options: IAssociationActionOptions

  #### Returns Promise<this>

### changed

- changed(key: string, value?: any): boolean
- changed(): boolean | string[]

- Inherited from Model.changed

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:605

  If changed is called with a string it will return a boolean indicating whether the value of that key in `dataValues` is different from the value in `_previousDataValues`.

  If changed is called without an argument, it will return an array of keys that have changed.

  If changed is called without an argument and no keys have changed, it will return `false`.

  #### Parameters

  - ##### key: string

  - ##### Optional value: any

  #### Returns boolean

- Inherited from Model.changed

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:606

  #### Returns boolean | string[]

### decrement

- decrement(fields: string | string[] | Object, options?: InstanceIncrementDecrementOptions & object): Promise<this>

- Inherited from Model.decrement

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:703

  Decrement the value of one or more columns. This is done in the database, which means it does not use the values currently stored on the Instance. The decrement is done using a

      SET column = column - X

  query. To get the correct value after an decrement into the Instance you should do a reload.

      instance.decrement('number') // decrement number by 1
      instance.decrement(['number', 'count'], { by: 2 }) // decrement number and count by 2
      instance.decrement({ answer: 42, tries: 1}, { by: 2 }) // decrement answer by 42, and tries by 1.
                                                             // `by` is ignored, since each column has its own
                                                             // value

  #### Parameters

  - ##### fields: string | string[] | Object

    If a string is provided, that column is decremented by the value of `by` given in options. If an array is provided, the same is true for each column. If an object is provided, each column is decremented by the value given

  - ##### Optional options: InstanceIncrementDecrementOptions & object

  #### Returns Promise<this>

### destroy

- destroy(options?: InstanceDestroyOptions): Promise<void>

- Inherited from Model.destroy

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:653

  Destroy the row corresponding to this instance. Depending on your setting for paranoid, the row will either be completely deleted, or have its deletedAt timestamp set to the current time.

  #### Parameters

  - ##### Optional options: InstanceDestroyOptions

  #### Returns Promise<void>

### equals

- equals(other: Model< GuaribasConversationMessage >): boolean

- Inherited from Model.equals

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:709

  Check whether all values of this and `other` Instance are the same

  #### Parameters

  - ##### other: Model< GuaribasConversationMessage >

  #### Returns boolean

### equalsOneOf

- equalsOneOf(others: Model< GuaribasConversationMessage >[]): boolean

- Inherited from Model.equalsOneOf

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:714

  Check if this is eqaul to one of `others` by calling equals

  #### Parameters

  - ##### others: Model< GuaribasConversationMessage >[]

  #### Returns boolean

### get

- get(key: string, options?: object): any
- get(options?: object): any

- Inherited from Model.get

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:563

  If no key is given, returns all values of the instance, also invoking virtual getters.

  If key is given and a field or virtual getter is present for the key it will call that getter - else it will return the value for key.

  #### Parameters

  - ##### key: string

  - ##### Optional options: object

    - ##### Optional clone?: boolean

    - ##### Optional plain?: boolean

      If set to true, included instances will be returned as plain objects

  #### Returns any

- Inherited from Model.get

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:564

  #### Parameters

  - ##### Optional options: object

    - ##### Optional clone?: boolean

    - ##### Optional plain?: boolean

  #### Returns any

### getDataValue

- getDataValue(key: string): any

- Inherited from Model.getDataValue

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:548

  Get the value of the underlying data value

  #### Parameters

  - ##### key: string

  #### Returns any

### increment

- increment(fields: string | string[] | Object, options?: InstanceIncrementDecrementOptions & object): Promise<this>

- Inherited from Model.increment

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:680

  Increment the value of one or more columns. This is done in the database, which means it does not use the values currently stored on the Instance. The increment is done using a

      SET column = column + X

  query. To get the correct value after an increment into the Instance you should do a reload.

      instance.increment('number') // increment number by 1
      instance.increment(['number', 'count'], { by: 2 }) // increment number and count by 2
      instance.increment({ answer: 42, tries: 1}, { by: 2 }) // increment answer by 42, and tries by 1.
                                                             // `by` is ignored, since each column has its own
                                                             // value

  #### Parameters

  - ##### fields: string | string[] | Object

    If a string is provided, that column is incremented by the value of `by` given in options. If an array is provided, the same is true for each column. If an object is provided, each column is incremented by the value given.

  - ##### Optional options: InstanceIncrementDecrementOptions & object

  #### Returns Promise<this>

### previous

- previous(key: string): any

- Inherited from Model.previous

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:611

  Returns the previous value for key from `_previousDataValues`.

  #### Parameters

  - ##### key: string

  #### Returns any

### reload

- reload(options?: IFindOptions<this>): Promise<this>

- Inherited from Model.reload

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:628

  Refresh the current instance in-place, i.e. update the object with current data from the DB and return the same object. This is different from doing a `find(Instance.id)`, because that would create and return a new instance. With this method, all references to the Instance are updated with the new data and no new objects are created.

  #### Parameters

  - ##### Optional options: IFindOptions<this>

  #### Returns Promise<this>

### restore

- restore(options?: InstanceRestoreOptions): Promise<void>

- Inherited from Model.restore

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:658

  Restore the row corresponding to this instance. Only available for paranoid models.

  #### Parameters

  - ##### Optional options: InstanceRestoreOptions

  #### Returns Promise<void>

### save

- save(options?: InstanceSaveOptions): Promise<this>

- Inherited from Model.save

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:620

  Validate this instance, and if the validation passes, persist it to the database.

  On success, the callback will be called with this instance. On validation error, the callback will be called with an instance of `Sequelize.ValidationError`. This error will have a property for each of the fields for which validation failed, with the error message for that field.

  #### Parameters

  - ##### Optional options: InstanceSaveOptions

  #### Returns Promise<this>

### set

- set(key: string, value: any, options?: InstanceSetOptions): this
- set(keys: Object, options?: InstanceSetOptions): this

- Inherited from Model.set

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:591

  Set is used to update values on the instance (the sequelize representation of the instance that is, remember that nothing will be persisted before you actually call `save`). In its most basic form `set` will update a value stored in the underlying `dataValues` object. However, if a custom setter function is defined for the key, that function will be called instead. To bypass the setter, you can pass `raw: true` in the options object.

  If set is called with an object, it will loop over the object, and call set recursively for each key, value pair. If you set raw to true, the underlying dataValues will either be set directly to the object passed, or used to extend dataValues, if dataValues already contain values.

  When set is called, the previous value of the field is stored and sets a changed flag(see `changed`).

  Set can also be used to build instances for associations, if you have values for those. When using set with associations you need to make sure the property key matches the alias of the association while also making sure that the proper include options have been set (from .build() or .find())

  If called with a dot.seperated key on a JSON/JSONB attribute it will set the value nested and flag the entire object as changed.

  #### Parameters

  - ##### key: string

  - ##### value: any

  - ##### Optional options: InstanceSetOptions

  #### Returns this

- Inherited from Model.set

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:592

  #### Parameters

  - ##### keys: Object

  - ##### Optional options: InstanceSetOptions

  #### Returns this

### setAttributes

- setAttributes(key: string, value: any, options?: InstanceSetOptions): this
- setAttributes(keys: Object, options?: InstanceSetOptions): this

- Inherited from Model.setAttributes

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:594

  #### Parameters

  - ##### key: string

  - ##### value: any

  - ##### Optional options: InstanceSetOptions

  #### Returns this

- Inherited from Model.setAttributes

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:595

  #### Parameters

  - ##### keys: Object

  - ##### Optional options: InstanceSetOptions

  #### Returns this

### setDataValue

- setDataValue(key: string, value: any): void

- Inherited from Model.setDataValue

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:553

  Update the underlying data value

  #### Parameters

  - ##### key: string

  - ##### value: any

  #### Returns void

### toJSON

- toJSON(): any

- Inherited from Model.toJSON

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:720

  Convert the instance to a JSON representation. Proxies to calling `get` with no keys. This means get all values gotten from the DB, and apply all custom getters.

  #### Returns any

### update

- update(key: string, value: any, options?: InstanceUpdateOptions): Promise<this>
- update(keys: Object, options?: InstanceUpdateOptions): Promise<this>

- Inherited from Model.update

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:643

  This is the same as calling `set` and then calling `save`.

  #### Parameters

  - ##### key: string

  - ##### value: any

  - ##### Optional options: InstanceUpdateOptions

  #### Returns Promise<this>

- Inherited from Model.update

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:644

  #### Parameters

  - ##### keys: Object

  - ##### Optional options: InstanceUpdateOptions

  #### Returns Promise<this>

### updateAttributes

- updateAttributes(key: string, value: any, options?: InstanceUpdateOptions): Promise<this>
- updateAttributes(keys: Object, options?: InstanceUpdateOptions): Promise<this>

- Inherited from Model.updateAttributes

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:646

  #### Parameters

  - ##### key: string

  - ##### value: any

  - ##### Optional options: InstanceUpdateOptions

  #### Returns Promise<this>

- Inherited from Model.updateAttributes

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:647

  #### Parameters

  - ##### keys: Object

  - ##### Optional options: InstanceUpdateOptions

  #### Returns Promise<this>

### validate

- validate(options?: object): Promise<ValidationError>

- Inherited from Model.validate

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:638

  Validate the attribute of this instance according to validation rules set in the model definition.

  Emits null if and only if validation successful; otherwise an Error instance containing { field name : [error msgs] } entries.

  #### Parameters

  - ##### Optional options: object

    - ##### Optional skip?: string[]

      An array of strings. All properties that are in this array will not be validated

  #### Returns Promise<ValidationError>

### where

- where(): Object

- Inherited from Model.where

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:543

  Get an object representing the query for this instance, use with `options.where`

  #### Returns Object

### Static addHook

- addHook(hookType: string, name: string, fn: Function): Hooks
- addHook<T>(hookType: string, name: string, fn: Function): Hooks
- addHook(hookType: string, fn: Function): Hooks
- addHook<T>(hookType: string, fn: Function): Hooks

- Inherited from Hooks.addHook

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:735

  Add a hook to the model

  alias

    hook

  #### Parameters

  - ##### hookType: string

  - ##### name: string

    Provide a name for the hook function. It can be used to remove the hook later or to order hooks based on some sort of priority system in the future.

  - ##### fn: Function

    The hook function

  #### Returns Hooks

- Inherited from Hooks.addHook

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:736

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### hookType: string

  - ##### name: string

  - ##### fn: Function

  #### Returns Hooks

- Inherited from Hooks.addHook

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:737

  #### Parameters

  - ##### hookType: string

  - ##### fn: Function

  #### Returns Hooks

- Inherited from Hooks.addHook

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:738

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### hookType: string

  - ##### fn: Function

  #### Returns Hooks

### Static addScope

- addScope<T>(name: string, scope: IFindOptions<T> | Function, options?: AddScopeOptions): void

- Inherited from Model.addScope

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:103

  Add a new scope to the model. This is especially useful for adding scopes with includes, when the model you want to include is not available at the time this model is defined.

  By default this will throw an error if a scope with that name already exists. Pass `override: true` in the options object to silence this error.

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### name: string

    The name of the scope. Use `defaultScope` to override the default scope

  - ##### scope: IFindOptions<T> | Function

  - ##### Optional options: AddScopeOptions

  #### Returns void

### Static afterBulkCreate

- afterBulkCreate<T>(name: string, fn: function): void
- afterBulkCreate<T>(fn: function): void

- Inherited from Hooks.afterBulkCreate

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:872

  A hook that is run after creating instances in bulk

  name

    afterBulkCreate

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### name: string

  - ##### fn: function

    A callback function that is called with instances, options

    - - (instances: T[], options: Object, fn?: Function): void

      - #### Parameters

        - ##### instances: T[]

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

- Inherited from Hooks.afterBulkCreate

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:874

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### fn: function

    - - (instances: T[], options: Object, fn?: Function): void

      - #### Parameters

        - ##### instances: T[]

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

### Static afterBulkDelete

- afterBulkDelete(name: string, fn: function): void
- afterBulkDelete(fn: function): void

- Inherited from Hooks.afterBulkDelete

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:901

  #### Parameters

  - ##### name: string

  - ##### fn: function

    - - (options: Object, fn?: Function): void

      - #### Parameters

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

- Inherited from Hooks.afterBulkDelete

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:902

  #### Parameters

  - ##### fn: function

    - - (options: Object, fn?: Function): void

      - #### Parameters

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

### Static afterBulkDestroy

- afterBulkDestroy(name: string, fn: function): void
- afterBulkDestroy(fn: function): void

- Inherited from Hooks.afterBulkDestroy

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:898

  A hook that is run after destroying instances in bulk

  alias

    afterBulkDelete

  #### Parameters

  - ##### name: string

  - ##### fn: function

    A callback function that is called with options

    - - (options: Object, fn?: Function): void

      - #### Parameters

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

- Inherited from Hooks.afterBulkDestroy

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:899

  #### Parameters

  - ##### fn: function

    - - (options: Object, fn?: Function): void

      - #### Parameters

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

### Static afterBulkSync

- afterBulkSync(name: string, fn: function): void
- afterBulkSync(fn: function): void

- Inherited from Hooks.afterBulkSync

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:1031

  A hook that is run after sequelize.sync call

  #### Parameters

  - ##### name: string

  - ##### fn: function

    A callback function that is called with options passed to sequelize.sync

    - - (options: SyncOptions): void

      - #### Parameters

        - ##### options: SyncOptions

        #### Returns void

- Inherited from Hooks.afterBulkSync

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:1032

  #### Parameters

  - ##### fn: function

    - - (options: SyncOptions): void

      - #### Parameters

        - ##### options: SyncOptions

        #### Returns void

### Static afterBulkUpdate

- afterBulkUpdate(name: string, fn: function): void
- afterBulkUpdate(fn: function): void

- Inherited from Hooks.afterBulkUpdate

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:919

  A hook that is run after updating instances in bulk

  #### Parameters

  - ##### name: string

  - ##### fn: function

    A callback function that is called with options

    - - (options: Object, fn?: Function): void

      - #### Parameters

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

- Inherited from Hooks.afterBulkUpdate

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:920

  #### Parameters

  - ##### fn: function

    - - (options: Object, fn?: Function): void

      - #### Parameters

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

### Static afterCreate

- afterCreate<T>(name: string, fn: function): void
- afterCreate<T>(fn: function): void

- Inherited from Hooks.afterCreate

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:800

  A hook that is run after creating a single instance

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### name: string

  - ##### fn: function

    A callback function that is called with attributes, options

    - - (attributes: T, options: Object, fn?: Function): void

      - #### Parameters

        - ##### attributes: T

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

- Inherited from Hooks.afterCreate

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:802

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### fn: function

    - - (attributes: T, options: Object, fn?: Function): void

      - #### Parameters

        - ##### attributes: T

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

### Static afterDefine

- afterDefine<T>(name: string, fn: function): void
- afterDefine<T>(fn: function): void

- Inherited from Hooks.afterDefine

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:977

  A hook that is run after a define call

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### name: string

  - ##### fn: function

    A callback function that is called with factory

    - - (model: Model<T>): void

      - #### Parameters

        - ##### model: Model<T>

        #### Returns void

- Inherited from Hooks.afterDefine

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:978

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### fn: function

    - - (model: Model<T>): void

      - #### Parameters

        - ##### model: Model<T>

        #### Returns void

### Static afterDelete

- afterDelete<T>(name: string, fn: function): void
- afterDelete<T>(fn: function): void

- Inherited from Hooks.afterDelete

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:830

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### name: string

  - ##### fn: function

    - - (instance: T, options: Object, fn?: Function): void

      - #### Parameters

        - ##### instance: T

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

- Inherited from Hooks.afterDelete

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:831

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### fn: function

    - - (instance: T, options: Object, fn?: Function): void

      - #### Parameters

        - ##### instance: T

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

### Static afterDestroy

- afterDestroy<T>(name: string, fn: function): void
- afterDestroy<T>(fn: function): void

- Inherited from Hooks.afterDestroy

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:826

  A hook that is run after destroying a single instance

  alias

    afterDelete

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### name: string

  - ##### fn: function

    A callback function that is called with instance, options

    - - (instance: T, options: Object, fn?: Function): void

      - #### Parameters

        - ##### instance: T

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

- Inherited from Hooks.afterDestroy

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:828

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### fn: function

    - - (instance: T, options: Object, fn?: Function): void

      - #### Parameters

        - ##### instance: T

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

### Static afterFind

- afterFind<T>(name: string, fn: function): void
- afterFind<T>(fn: function): void

- Inherited from Hooks.afterFind

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:956

  A hook that is run after a find (select) query

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### name: string

  - ##### fn: function

    A callback function that is called with instance(s), options

    - - (instancesOrInstance: T[] | T, options: Object, fn?: Function): void

      - #### Parameters

        - ##### instancesOrInstance: T[] | T

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

- Inherited from Hooks.afterFind

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:959

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### fn: function

    - - (instancesOrInstance: T[] | T, options: Object, fn?: Function): void

      - #### Parameters

        - ##### instancesOrInstance: T[] | T

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

### Static afterInit

- afterInit(name: string, fn: function): void
- afterInit(fn: function): void

- Inherited from Hooks.afterInit

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:995

  A hook that is run after Sequelize() call

  #### Parameters

  - ##### name: string

  - ##### fn: function

    A callback function that is called with sequelize

    - - (sequelize: Sequelize): void

      - #### Parameters

        - ##### sequelize: Sequelize

        #### Returns void

- Inherited from Hooks.afterInit

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:996

  #### Parameters

  - ##### fn: function

    - - (sequelize: Sequelize): void

      - #### Parameters

        - ##### sequelize: Sequelize

        #### Returns void

### Static afterSync

- afterSync(name: string, fn: function): void
- afterSync(fn: function): void

- Inherited from Hooks.afterSync

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:1013

  A hook that is run after Model.sync call

  #### Parameters

  - ##### name: string

  - ##### fn: function

    A callback function that is called with options passed to Model.sync

    - - (options: SyncOptions): void

      - #### Parameters

        - ##### options: SyncOptions

        #### Returns void

- Inherited from Hooks.afterSync

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:1014

  #### Parameters

  - ##### fn: function

    - - (options: SyncOptions): void

      - #### Parameters

        - ##### options: SyncOptions

        #### Returns void

### Static afterUpdate

- afterUpdate<T>(name: string, fn: function): void
- afterUpdate<T>(fn: function): void

- Inherited from Hooks.afterUpdate

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:852

  A hook that is run after updating a single instance

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### name: string

  - ##### fn: function

    A callback function that is called with instance, options

    - - (instance: T, options: Object, fn?: Function): void

      - #### Parameters

        - ##### instance: T

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

- Inherited from Hooks.afterUpdate

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:853

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### fn: function

    - - (instance: T, options: Object, fn?: Function): void

      - #### Parameters

        - ##### instance: T

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

### Static afterValidate

- afterValidate<T>(name: string, fn: function): void
- afterValidate<T>(fn: function): void

- Inherited from Hooks.afterValidate

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:780

  A hook that is run after validation

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### name: string

  - ##### fn: function

    A callback function that is called with instance, options

    - - (instance: T, options: Object, fn?: Function): void

      - #### Parameters

        - ##### instance: T

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

- Inherited from Hooks.afterValidate

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:782

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### fn: function

    - - (instance: T, options: Object, fn?: Function): void

      - #### Parameters

        - ##### instance: T

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

### Static aggregate

- aggregate(field: string, aggregateFunction: string, options?: AggregateOptions): Promise<Object>

- Inherited from Model.aggregate

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:246

  Run an aggregation method on the specified field

  #### Parameters

  - ##### field: string

    The field to aggregate over. Can be a field name or *

  - ##### aggregateFunction: string

    The function to use for aggregation, e.g. sum, max etc.

  - ##### Optional options: AggregateOptions

    Query options. See sequelize.query for full options

  #### Returns Promise<Object>

  Returns the aggregate result cast to `options.dataType`, unless `options.plain` is false, in which case the complete data result is returned.

### Static all

- all<T>(this: object, options?: IFindOptions<T>): Promise<T[]>

- Inherited from Model.all

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:219

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### this: object

  - ##### Optional options: IFindOptions<T>

  #### Returns Promise<T[]>

### Static beforeBulkCreate

- beforeBulkCreate<T>(name: string, fn: function): void
- beforeBulkCreate<T>(fn: function): void

- Inherited from Hooks.beforeBulkCreate

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:861

  A hook that is run before creating instances in bulk

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### name: string

  - ##### fn: function

    A callback function that is called with instances, options

    - - (instances: T[], options: Object, fn?: Function): void

      - #### Parameters

        - ##### instances: T[]

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

- Inherited from Hooks.beforeBulkCreate

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:863

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### fn: function

    - - (instances: T[], options: Object, fn?: Function): void

      - #### Parameters

        - ##### instances: T[]

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

### Static beforeBulkDelete

- beforeBulkDelete(name: string, fn: function): void
- beforeBulkDelete(fn: function): void

- Inherited from Hooks.beforeBulkDelete

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:887

  #### Parameters

  - ##### name: string

  - ##### fn: function

    - - (options: Object, fn?: Function): void

      - #### Parameters

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

- Inherited from Hooks.beforeBulkDelete

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:888

  #### Parameters

  - ##### fn: function

    - - (options: Object, fn?: Function): void

      - #### Parameters

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

### Static beforeBulkDestroy

- beforeBulkDestroy(name: string, fn: function): void
- beforeBulkDestroy(fn: function): void

- Inherited from Hooks.beforeBulkDestroy

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:884

  A hook that is run before destroying instances in bulk

  alias

    beforeBulkDelete

  #### Parameters

  - ##### name: string

  - ##### fn: function

    A callback function that is called with options

    - - (options: Object, fn?: Function): void

      - #### Parameters

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

- Inherited from Hooks.beforeBulkDestroy

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:885

  #### Parameters

  - ##### fn: function

    - - (options: Object, fn?: Function): void

      - #### Parameters

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

### Static beforeBulkSync

- beforeBulkSync(name: string, fn: function): void
- beforeBulkSync(fn: function): void

- Inherited from Hooks.beforeBulkSync

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:1022

  A hook that is run before sequelize.sync call

  #### Parameters

  - ##### name: string

  - ##### fn: function

    A callback function that is called with options passed to sequelize.sync

    - - (options: SyncOptions): void

      - #### Parameters

        - ##### options: SyncOptions

        #### Returns void

- Inherited from Hooks.beforeBulkSync

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:1023

  #### Parameters

  - ##### fn: function

    - - (options: SyncOptions): void

      - #### Parameters

        - ##### options: SyncOptions

        #### Returns void

### Static beforeBulkUpdate

- beforeBulkUpdate(name: string, fn: function): void
- beforeBulkUpdate(fn: function): void

- Inherited from Hooks.beforeBulkUpdate

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:910

  A hook that is run after updating instances in bulk

  #### Parameters

  - ##### name: string

  - ##### fn: function

    A callback function that is called with options

    - - (options: Object, fn?: Function): void

      - #### Parameters

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

- Inherited from Hooks.beforeBulkUpdate

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:911

  #### Parameters

  - ##### fn: function

    - - (options: Object, fn?: Function): void

      - #### Parameters

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

### Static beforeCreate

- beforeCreate<T>(name: string, fn: function): void
- beforeCreate<T>(fn: function): void

- Inherited from Hooks.beforeCreate

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:790

  A hook that is run before creating a single instance

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### name: string

  - ##### fn: function

    A callback function that is called with attributes, options

    - - (attributes: T, options: Object, fn?: Function): void

      - #### Parameters

        - ##### attributes: T

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

- Inherited from Hooks.beforeCreate

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:792

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### fn: function

    - - (attributes: T, options: Object, fn?: Function): void

      - #### Parameters

        - ##### attributes: T

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

### Static beforeDefine

- beforeDefine(name: string, fn: function): void
- beforeDefine(fn: function): void

- Inherited from Hooks.beforeDefine

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:968

  A hook that is run before a define call

  #### Parameters

  - ##### name: string

  - ##### fn: function

    A callback function that is called with attributes, options

    - - (attributes: DefineAttributes, options: Object): void

      - #### Parameters

        - ##### attributes: DefineAttributes

        - ##### options: Object

        #### Returns void

- Inherited from Hooks.beforeDefine

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:969

  #### Parameters

  - ##### fn: function

    - - (attributes: DefineAttributes, options: Object): void

      - #### Parameters

        - ##### attributes: DefineAttributes

        - ##### options: Object

        #### Returns void

### Static beforeDelete

- beforeDelete<T>(name: string, fn: function): void
- beforeDelete<T>(fn: function): void

- Inherited from Hooks.beforeDelete

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:815

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### name: string

  - ##### fn: function

    - - (instance: T, options: Object, fn?: Function): void

      - #### Parameters

        - ##### instance: T

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

- Inherited from Hooks.beforeDelete

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:817

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### fn: function

    - - (instance: T, options: Object, fn?: Function): void

      - #### Parameters

        - ##### instance: T

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

### Static beforeDestroy

- beforeDestroy<T>(name: string, fn: function): void
- beforeDestroy<T>(fn: function): void

- Inherited from Hooks.beforeDestroy

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:811

  A hook that is run before destroying a single instance

  alias

    beforeDelete

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### name: string

  - ##### fn: function

    A callback function that is called with instance, options

    - - (instance: T, options: Object, fn?: Function): void

      - #### Parameters

        - ##### instance: T

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

- Inherited from Hooks.beforeDestroy

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:813

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### fn: function

    - - (instance: T, options: Object, fn?: Function): void

      - #### Parameters

        - ##### instance: T

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

### Static beforeFind

- beforeFind(name: string, fn: function): void
- beforeFind(fn: function): void

- Inherited from Hooks.beforeFind

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:928

  A hook that is run before a find (select) query

  #### Parameters

  - ##### name: string

  - ##### fn: function

    A callback function that is called with options

    - - (options: Object, fn?: Function): void

      - #### Parameters

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

- Inherited from Hooks.beforeFind

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:929

  #### Parameters

  - ##### fn: function

    - - (options: Object, fn?: Function): void

      - #### Parameters

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

### Static beforeFindAfterExpandIncludeAll

- beforeFindAfterExpandIncludeAll(name: string, fn: function): void
- beforeFindAfterExpandIncludeAll(fn: function): void

- Inherited from Hooks.beforeFindAfterExpandIncludeAll

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:937

  A hook that is run before a find (select) query, after any { include: {all: ...} } options are expanded

  #### Parameters

  - ##### name: string

  - ##### fn: function

    A callback function that is called with options

    - - (options: Object, fn?: Function): void

      - #### Parameters

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

- Inherited from Hooks.beforeFindAfterExpandIncludeAll

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:939

  #### Parameters

  - ##### fn: function

    - - (options: Object, fn?: Function): void

      - #### Parameters

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

### Static beforeFindAfterOptions

- beforeFindAfterOptions(name: string, fn: function): void
- beforeFindAfterOptions(fn: function): void

- Inherited from Hooks.beforeFindAfterOptions

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:947

  A hook that is run before a find (select) query, after all option parsing is complete

  #### Parameters

  - ##### name: string

  - ##### fn: function

    A callback function that is called with options

    - - (options: Object, fn?: Function): void

      - #### Parameters

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

- Inherited from Hooks.beforeFindAfterOptions

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:948

  #### Parameters

  - ##### fn: function

    - - (options: Object, fn?: Function): void

      - #### Parameters

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

### Static beforeInit

- beforeInit(name: string, fn: function): void
- beforeInit(fn: function): void

- Inherited from Hooks.beforeInit

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:986

  A hook that is run before Sequelize() call

  #### Parameters

  - ##### name: string

  - ##### fn: function

    A callback function that is called with config, options

    - - (config: Object, options: Object): void

      - #### Parameters

        - ##### config: Object

        - ##### options: Object

        #### Returns void

- Inherited from Hooks.beforeInit

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:987

  #### Parameters

  - ##### fn: function

    - - (config: Object, options: Object): void

      - #### Parameters

        - ##### config: Object

        - ##### options: Object

        #### Returns void

### Static beforeSync

- beforeSync(name: string, fn: function): void
- beforeSync(fn: function): void

- Inherited from Hooks.beforeSync

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:1004

  A hook that is run before Model.sync call

  #### Parameters

  - ##### name: string

  - ##### fn: function

    A callback function that is called with options passed to Model.sync

    - - (options: SyncOptions): void

      - #### Parameters

        - ##### options: SyncOptions

        #### Returns void

- Inherited from Hooks.beforeSync

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:1005

  #### Parameters

  - ##### fn: function

    - - (options: SyncOptions): void

      - #### Parameters

        - ##### options: SyncOptions

        #### Returns void

### Static beforeUpdate

- beforeUpdate(name: string, fn: function): void
- beforeUpdate(fn: function): void
- beforeUpdate<T>(name: string, fn: function): void
- beforeUpdate<T>(fn: function): void

- Inherited from Hooks.beforeUpdate

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:839

  A hook that is run before updating a single instance

  #### Parameters

  - ##### name: string

  - ##### fn: function

    A callback function that is called with instance, options

    - - (instance: any, options: Object, fn?: Function): void

      - #### Parameters

        - ##### instance: any

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

- Inherited from Hooks.beforeUpdate

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:841

  #### Parameters

  - ##### fn: function

    - - (instance: any, options: Object, fn?: Function): void

      - #### Parameters

        - ##### instance: any

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

- Inherited from Hooks.beforeUpdate

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:842

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### name: string

  - ##### fn: function

    - - (instance: T, options: Object, fn?: Function): void

      - #### Parameters

        - ##### instance: T

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

- Inherited from Hooks.beforeUpdate

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:844

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### fn: function

    - - (instance: T, options: Object, fn?: Function): void

      - #### Parameters

        - ##### instance: T

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

### Static beforeValidate

- beforeValidate<T>(name: string, fn: function): void
- beforeValidate<T>(fn: function): void

- Inherited from Hooks.beforeValidate

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:770

  A hook that is run before validation

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### name: string

  - ##### fn: function

    A callback function that is called with instance, options

    - - (instance: T, options: Object, fn?: Function): void

      - #### Parameters

        - ##### instance: T

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

- Inherited from Hooks.beforeValidate

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:772

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### fn: function

    - - (instance: T, options: Object, fn?: Function): void

      - #### Parameters

        - ##### instance: T

        - ##### options: Object

        - ##### Optional fn: Function

        #### Returns void

### Static build

- build<T>(this: object, record?: FilteredModelAttributes<T>, options?: IBuildOptions): T
- build<T, A>(this: object, record?: A, options?: IBuildOptions): T

- Inherited from Model.build

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:312

  Builds a new model instance. Values is an object of key value pairs, must be defined but can be empty.

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### this: object

  - ##### Optional record: FilteredModelAttributes<T>

  - ##### Optional options: IBuildOptions

  #### Returns T

- Inherited from Model.build

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:313

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  - #### A

  #### Parameters

  - ##### this: object

  - ##### Optional record: A

  - ##### Optional options: IBuildOptions

  #### Returns T

### Static bulkBuild

- bulkBuild<T>(this: object, records: FilteredModelAttributes<T>[], options?: IBuildOptions): T[]
- bulkBuild<T, A>(this: object, records: A[], options?: IBuildOptions): T[]

- Inherited from Model.bulkBuild

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:318

  Undocumented bulkBuild

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### this: object

  - ##### records: FilteredModelAttributes<T>[]

  - ##### Optional options: IBuildOptions

  #### Returns T[]

- Inherited from Model.bulkBuild

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:319

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  - #### A

  #### Parameters

  - ##### this: object

  - ##### records: A[]

  - ##### Optional options: IBuildOptions

  #### Returns T[]

### Static bulkCreate

- bulkCreate<T>(this: object, records: FilteredModelAttributes<T>[], options?: BulkCreateOptions): Promise<T[]>
- bulkCreate<T, A>(this: object, records: A[], options?: BulkCreateOptions): Promise<T[]>

- Inherited from Model.bulkCreate

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:394

  Create and insert multiple instances in bulk.

  The success handler is passed an array of instances, but please notice that these may not completely represent the state of the rows in the DB. This is because MySQL and SQLite do not make it easy to obtain back automatically generated IDs and other default values in a way that can be mapped to multiple records. To obtain Instances for the newly created values, you will need to query for them again.

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### this: object

  - ##### records: FilteredModelAttributes<T>[]

    List of objects (key/value pairs) to create instances from

  - ##### Optional options: BulkCreateOptions

  #### Returns Promise<T[]>

- Inherited from Model.bulkCreate

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:395

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  - #### A

  #### Parameters

  - ##### this: object

  - ##### records: A[]

  - ##### Optional options: BulkCreateOptions

  #### Returns Promise<T[]>

### Static count

- count<T>(this: object, options?: ICountOptions<T>): Promise<number>

- Inherited from Model.count

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:253

  Count the number of records matching the provided where clause.

  If you provide an `include` option, the number of matching associations will be counted instead.

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### this: object

  - ##### Optional options: ICountOptions<T>

  #### Returns Promise<number>

### Static create

- create<T>(this: object, values?: FilteredModelAttributes<T>, options?: ICreateOptions): Promise<T>
- create<T, A>(this: object, values?: A, options?: ICreateOptions): Promise<T>

- Inherited from Model.create

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:324

  Builds a new model instance and calls save on it.

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### this: object

  - ##### Optional values: FilteredModelAttributes<T>

  - ##### Optional options: ICreateOptions

  #### Returns Promise<T>

- Inherited from Model.create

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:325

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  - #### A

  #### Parameters

  - ##### this: object

  - ##### Optional values: A

  - ##### Optional options: ICreateOptions

  #### Returns Promise<T>

### Static describe

- describe(): Promise<Object>

- Inherited from Model.describe

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:447

  Run a describe query on the table. The result will be return to the listener as a hash of attributes and their types.

  #### Returns Promise<Object>

### Static destroy

- destroy(options?: DestroyOptions): Promise<number>

- Inherited from Model.destroy

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:407

  Delete multiple instances, or set their deletedAt timestamp to the current time if `paranoid` is enabled.

  #### Parameters

  - ##### Optional options: DestroyOptions

  #### Returns Promise<number>

  Promise<number> The number of destroyed rows

### Static drop

- drop(options?: DropOptions): Promise<void>

- Inherited from Model.drop

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:68

  Drop the table represented by this Model

  #### Parameters

  - ##### Optional options: DropOptions

  #### Returns Promise<void>

### Static find

- find<T>(this: object, options?: IFindOptions<T>): Promise<T | null>

- Inherited from Model.find

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:235

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### this: object

  - ##### Optional options: IFindOptions<T>

  #### Returns Promise<T | null>

### Static findAll

- findAll<T>(this: object, options?: IFindOptions<T>): Promise<T[]>

- Inherited from Model.findAll

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:217

  Search for multiple instances.

  Simple search using AND and =

      Model.findAll({
        where: {
          attr1: 42,
          attr2: 'cake'
        }
      })

      WHERE attr1 = 42 AND attr2 = 'cake'

  Using greater than, less than etc.

      Model.findAll({
        where: {
          attr1: {
            gt: 50
          },
          attr2: {
            lte: 45
          },
          attr3: {
            in: [1,2,3]
          },
          attr4: {
            ne: 5
          }
        }
      })

      WHERE attr1 > 50 AND attr2 <= 45 AND attr3 IN (1,2,3) AND attr4 != 5

  Possible options are: `$ne, $in, $not, $notIn, $gte, $gt, $lte, $lt, $like, $ilike/$iLike, $notLike, $notILike, '..'/$between, '!..'/$notBetween, '&&'/$overlap, '@>'/$contains, '<@'/$contained`

  Queries using OR

      Model.findAll({
        where: Sequelize.and(
          { name: 'a project' },
          Sequelize.or(
            { id: [1,2,3] },
            { id: { gt: 10 } }
          )
        )
      })

      WHERE name = 'a project' AND (id` IN (1,2,3) OR id > 10)

  The success listener is called with an array of instances if the query succeeds.

  see

    {Sequelize#query}

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### this: object

  - ##### Optional options: IFindOptions<T>

  #### Returns Promise<T[]>

### Static findAndCount

- findAndCount<T>(this: object, options?: IFindOptions<T>): Promise<object>

- Inherited from Model.findAndCount

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:290

  Find all the rows matching your query, within a specified offset / limit, and get the total number of rows matching your query. This is very usefull for paging

      Model.findAndCountAll({
        where: ...,
        limit: 12,
        offset: 12
      }).then(function (result) {
        ...
      })

  In the above example, `result.rows` will contain rows 13 through 24, while `result.count` will return the total number of rows that matched your query.

  When you add includes, only those which are required (either because they have a where clause, or because `required` is explicitly set to true on the include) will be added to the count part.

  Suppose you want to find all users who have a profile attached:

      User.findAndCountAll({
        include: [
           { model: Profile, required: true}
        ],
        limit 3
      });

  Because the include for `Profile` has `required` set it will result in an inner join, and only the users who have a profile will be counted. If we remove `required` from the include, both users with and without profiles will be counted

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### this: object

  - ##### Optional options: IFindOptions<T>

  #### Returns Promise<object>

### Static findAndCountAll

- findAndCountAll<T>(this: object, options?: IFindOptions<T>): Promise<object>

- Inherited from Model.findAndCountAll

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:292

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### this: object

  - ##### Optional options: IFindOptions<T>

  #### Returns Promise<object>

### Static findById

- findById<T>(this: object, identifier?: number | string, options?: IFindOptions<T>): Promise<T | null>

- Inherited from Model.findById

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:225

  Search for a single instance by its primary key. This applies LIMIT 1, so the listener will always be called with a single instance.

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### this: object

  - ##### Optional identifier: number | string

  - ##### Optional options: IFindOptions<T>

  #### Returns Promise<T | null>

### Static findByPrimary

- findByPrimary<T>(this: object, identifier?: number | string, options?: IFindOptions<T>): Promise<T | null>

- Inherited from Model.findByPrimary

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:227

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### this: object

  - ##### Optional identifier: number | string

  - ##### Optional options: IFindOptions<T>

  #### Returns Promise<T | null>

### Static findCreateFind

- findCreateFind<T>(this: object, options: IFindCreateFindOptions<FilteredModelAttributes<T>>): Promise<[T, boolean]>
- findCreateFind<T, A>(this: object, options: IFindCreateFindOptions<A>): Promise<[T, boolean]>

- Inherited from Model.findCreateFind

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:355

  A more performant findOrCreate that will not work under a transaction (at least not in postgres) Will execute a find call, if empty then attempt to create, if unique constraint then attempt to find again

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### this: object

  - ##### options: IFindCreateFindOptions<FilteredModelAttributes<T>>

  #### Returns Promise<[T, boolean]>

- Inherited from Model.findCreateFind

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:356

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  - #### A

  #### Parameters

  - ##### this: object

  - ##### options: IFindCreateFindOptions<A>

  #### Returns Promise<[T, boolean]>

### Static findOne

- findOne<T>(this: object, options?: IFindOptions<T>): Promise<T | null>

- Inherited from Model.findOne

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:233

  Search for a single instance. This applies LIMIT 1, so the listener will always be called with a single instance.

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### this: object

  - ##### Optional options: IFindOptions<T>

  #### Returns Promise<T | null>

### Static findOrBuild

- findOrBuild<T>(this: object, options: IFindOrInitializeOptions<FilteredModelAttributes<T>>): Promise<[T, boolean]>
- findOrBuild<T, A>(this: object, options: IFindOrInitializeOptions<A>): Promise<[T, boolean]>

- Inherited from Model.findOrBuild

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:334

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### this: object

  - ##### options: IFindOrInitializeOptions<FilteredModelAttributes<T>>

  #### Returns Promise<[T, boolean]>

- Inherited from Model.findOrBuild

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:335

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  - #### A

  #### Parameters

  - ##### this: object

  - ##### options: IFindOrInitializeOptions<A>

  #### Returns Promise<[T, boolean]>

### Static findOrCreate

- findOrCreate<T>(this: object, options: IFindOrInitializeOptions<FilteredModelAttributes<T>>): Promise<[T, boolean]>
- findOrCreate<T, A>(this: object, options: IFindOrInitializeOptions<A>): Promise<[T, boolean]>

- Inherited from Model.findOrCreate

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:348

  Find a row that matches the query, or build and save the row if none is found The successful result of the promise will be (instance, created) - Make sure to use .spread()

  If no transaction is passed in the `options` object, a new transaction will be created internally, to prevent the race condition where a matching row is created by another connection after the find but before the insert call. However, it is not always possible to handle this case in SQLite, specifically if one transaction inserts and another tries to select before the first one has comitted. In this case, an instance of sequelize.TimeoutError will be thrown instead. If a transaction is created, a savepoint will be created instead, and any unique constraint violation will be handled internally.

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### this: object

  - ##### options: IFindOrInitializeOptions<FilteredModelAttributes<T>>

  #### Returns Promise<[T, boolean]>

- Inherited from Model.findOrCreate

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:349

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  - #### A

  #### Parameters

  - ##### this: object

  - ##### options: IFindOrInitializeOptions<A>

  #### Returns Promise<[T, boolean]>

### Static findOrInitialize

- findOrInitialize<T>(this: object, options: IFindOrInitializeOptions<FilteredModelAttributes<T>>): Promise<[T, boolean]>
- findOrInitialize<T, A>(this: object, options: IFindOrInitializeOptions<A>): Promise<[T, boolean]>

- Inherited from Model.findOrInitialize

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:331

  Find a row that matches the query, or build (but don't save) the row if none is found. The successfull result of the promise will be (instance, initialized) - Make sure to use .spread()

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### this: object

  - ##### options: IFindOrInitializeOptions<FilteredModelAttributes<T>>

  #### Returns Promise<[T, boolean]>

- Inherited from Model.findOrInitialize

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:332

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  - #### A

  #### Parameters

  - ##### this: object

  - ##### options: IFindOrInitializeOptions<A>

  #### Returns Promise<[T, boolean]>

### Static getTableName

- getTableName(options?: GetTableNameOptions): string | Object

- Inherited from Model.getTableName

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:91

  Get the tablename of the model, taking schema into account. The method will return The name as a string if the model has no schema, or an object with `tableName`, `schema` and `delimiter` properties.

  #### Parameters

  - ##### Optional options: GetTableNameOptions

    The hash of options from any query. You can use one model to access tables with matching schemas by overriding `getTableName` and using custom key/values to alter the name of the table. (eg. subscribers_1, subscribers_2)

  #### Returns string | Object

### Static hasHook

- hasHook(hookType: string): boolean

- Inherited from Hooks.hasHook

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:760

  Check whether the mode has any hooks of this type

  alias

    hasHooks

  #### Parameters

  - ##### hookType: string

  #### Returns boolean

### Static hasHooks

- hasHooks(hookType: string): boolean

- Inherited from Hooks.hasHooks

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:762

  #### Parameters

  - ##### hookType: string

  #### Returns boolean

### Static hook

- hook(hookType: string, name: string, fn: Function): Hooks
- hook<T>(hookType: string, name: string, fn: Function): Hooks
- hook(hookType: string, fn: Function): Hooks
- hook<T>(hookType: string, fn: Function): Hooks

- Inherited from Hooks.hook

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:740

  #### Parameters

  - ##### hookType: string

  - ##### name: string

  - ##### fn: Function

  #### Returns Hooks

- Inherited from Hooks.hook

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:741

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### hookType: string

  - ##### name: string

  - ##### fn: Function

  #### Returns Hooks

- Inherited from Hooks.hook

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:742

  #### Parameters

  - ##### hookType: string

  - ##### fn: Function

  #### Returns Hooks

- Inherited from Hooks.hook

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:743

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### hookType: string

  - ##### fn: Function

  #### Returns Hooks

### Static increment

- increment<T>(fields: string | string[] | Object, options?: InstanceIncrementDecrementOptions & object): Promise<[Array<T>, number]> | Promise<[number, void]>

- Inherited from Model.increment

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:432

  Increment the value of one or more columns. This is done in the database, which means it does not use the values currently stored on the Instance. The increment is done using a

      SET column = column + X WHERE foo = 'bar'

  query. To get the correct value after an increment into the Instance you should do a reload.

      Model.increment('number', { where: { foo: 'bar' }) // increment number by 1
      Model.increment(['number', 'count'], { by: 2, where: { foo: 'bar' } }) // increment number and count by 2
      Model.increment({ answer: 42, tries: -1}, { by: 2, where: { foo: 'bar' } }) // increment answer by 42, and decrement tries by 1.
                                                             // `by` is ignored, since each column has its own value

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### fields: string | string[] | Object

    If a string is provided, that column is incremented by the value of `by` given in options. If an array is provided, the same is true for each column. If an object is provided, each column is incremented by the value given.

  - ##### Optional options: InstanceIncrementDecrementOptions & object

  #### Returns Promise<[Array<T>, number]> | Promise<[number, void]>

### Static insertOrUpdate

- insertOrUpdate<A>(values: Partial<A>, options?: object & UpsertOptions): Promise<boolean>
- insertOrUpdate<A>(values: Partial<A>, options?: object & UpsertOptions): Promise<[A, boolean]>

- Inherited from Model.insertOrUpdate

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:380

  #### Type parameters

  - #### A

  #### Parameters

  - ##### values: Partial<A>

  - ##### Optional options: object & UpsertOptions

  #### Returns Promise<boolean>

- Inherited from Model.insertOrUpdate

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:381

  #### Type parameters

  - #### A

  #### Parameters

  - ##### values: Partial<A>

  - ##### Optional options: object & UpsertOptions

  #### Returns Promise<[A, boolean]>

### Static max

- max(field: string, options?: AggregateOptions): Promise<any>

- Inherited from Model.max

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:297

  Find the maximum value of field

  #### Parameters

  - ##### field: string

  - ##### Optional options: AggregateOptions

  #### Returns Promise<any>

### Static min

- min(field: string, options?: AggregateOptions): Promise<any>

- Inherited from Model.min

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:302

  Find the minimum value of field

  #### Parameters

  - ##### field: string

  - ##### Optional options: AggregateOptions

  #### Returns Promise<any>

### Static removeAttribute

- removeAttribute(attribute: string): void

- Inherited from Model.removeAttribute

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:55

  Remove attribute from model definition

  #### Parameters

  - ##### attribute: string

  #### Returns void

### Static removeHook

- removeHook<T>(hookType: string, name: string): Hooks

- Inherited from Hooks.removeHook

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:751

  Remove hook from the model

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### hookType: string

  - ##### name: string

  #### Returns Hooks

### Static restore

- restore(options?: RestoreOptions): Promise<void>

- Inherited from Model.restore

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:412

  Restore multiple instances if `paranoid` is enabled.

  #### Parameters

  - ##### Optional options: RestoreOptions

  #### Returns Promise<void>

### Static schema

- schema<T>(this: object, schema: string, options?: SchemaOptions): Model<T>

- Inherited from Model.schema

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:79

  Apply a schema to this model. For postgres, this will actually place the schema in front of the table name

  - `"schema"."tableName"`, while the schema will be prepended to the table name for mysql and sqlite - `'schema.tablename'`.

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### this: object

  - ##### schema: string

    The name of the schema

  - ##### Optional options: SchemaOptions

  #### Returns Model<T>

### Static scope

- scope<T>(this: NonAbstractTypeOfModel<T>, options?: string | string[] | ScopeOptions | WhereOptions<any>): NonAbstractTypeOfModel<T>
- scope<T>(this: NonAbstractTypeOfModel<T>, ...scopes: (string | ScopeOptions | object)[]): NonAbstractTypeOfModel<T>

- Inherited from Model.scope

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:152

  Apply a scope created in `define` to the model. First let's look at how to create scopes:

      var Model = sequelize.define('model', attributes, {
        defaultScope: {
          where: {
            username: 'dan'
          },
          limit: 12
        },
        scopes: {
          isALie: {
            where: {
              stuff: 'cake'
            }
          },
          complexFunction: function(email, accessLevel) {
            return {
              where: {
                email: {
                  $like: email
                },
                accesss_level {
                  $gte: accessLevel
                }
              }
            }
          }
        }
      })

  Now, since you defined a default scope, every time you do Model.find, the default scope is appended to your query. Here's a couple of examples:

      Model.findAll() // WHERE username = 'dan'
      Model.findAll({ where: { age: { gt: 12 } } }) // WHERE age > 12 AND username = 'dan'

  To invoke scope functions you can do:

      Model.scope({ method: ['complexFunction' 'dan@sequelize.com', 42]}).findAll()
      // WHERE email like 'dan@sequelize.com%' AND access_level >= 42

  #### Type parameters

  - #### T

  #### Parameters

  - ##### this: NonAbstractTypeOfModel<T>

  - ##### Optional options: string | string[] | ScopeOptions | WhereOptions<any>

  #### Returns NonAbstractTypeOfModel<T>

  Model A reference to the model, with the scope(s) applied. Calling scope again on the returned model will clear the previous scope.

- Inherited from Model.scope

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:153

  #### Type parameters

  - #### T

  #### Parameters

  - ##### this: NonAbstractTypeOfModel<T>

  - ##### Rest ...scopes: (string | ScopeOptions | object)[]

  #### Returns NonAbstractTypeOfModel<T>

### Static sum

- sum(field: string, options?: AggregateOptions): Promise<number>

- Inherited from Model.sum

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:307

  Find the sum of field

  #### Parameters

  - ##### field: string

  - ##### Optional options: AggregateOptions

  #### Returns Promise<number>

### Static sync

- sync(options?: SyncOptions): Promise<any>

- Inherited from Model.sync

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:61

  Sync this Model to the DB, that is create the table. Upon success, the callback will be called with the model instance (this)

  #### Parameters

  - ##### Optional options: SyncOptions

  #### Returns Promise<any>

### Static truncate

- truncate(options?: TruncateOptions): Promise<void>

- Inherited from Model.truncate

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:400

  Truncate all instances of the model. This is a convenient method for Model.destroy({ truncate: true }).

  #### Parameters

  - ##### Optional options: TruncateOptions

  #### Returns Promise<void>

### Static unscoped

- unscoped<T>(this: NonAbstractTypeOfModel<T>): NonAbstractTypeOfModel<T>

- Inherited from Model.unscoped

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:452

  Unscope the model

  #### Type parameters

  - #### T

  #### Parameters

  - ##### this: NonAbstractTypeOfModel<T>

  #### Returns NonAbstractTypeOfModel<T>

### Static update

- update<T>(this: object, values: FilteredModelAttributes<T>, options: UpdateOptions): Promise<[number, Array<T>]>
- update<T, A>(this: object, values: A, options: UpdateOptions): Promise<[number, Array<T>]>

- Inherited from Model.update

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:440

  Update multiple instances that match the where options. The promise returns an array with one or two elements. The first element is always the number of affected rows, while the second element is the actual affected rows (only supported in postgres with `options.returning` true.)

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  #### Parameters

  - ##### this: object

  - ##### values: FilteredModelAttributes<T>

  - ##### options: UpdateOptions

  #### Returns Promise<[number, Array<T>]>

- Inherited from Model.update

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:441

  #### Type parameters

  - #### T: Model< GuaribasConversationMessage >

  - #### A

  #### Parameters

  - ##### this: object

  - ##### values: A

  - ##### options: UpdateOptions

  #### Returns Promise<[number, Array<T>]>

### Static upsert

- upsert<A>(values: Partial<A>, options?: object & UpsertOptions): Promise<boolean>
- upsert<A>(values: Partial<A>, options?: object & UpsertOptions): Promise<[A, boolean]>

- Inherited from Model.upsert

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:377

  Insert or update a single row. An update will be executed if a row which matches the supplied values on either the primary key or a unique key is found. Note that the unique index must be defined in your sequelize model and not just in the table. Otherwise you may experience a unique constraint violation, because sequelize fails to identify the row that should be updated.

  Implementation details:

  - MySQL - Implemented as a single query `INSERT values ON DUPLICATE KEY UPDATE values`
  - PostgreSQL - Implemented as a temporary function with exception handling: INSERT EXCEPTION WHEN unique_constraint UPDATE
  - SQLite - Implemented as two queries `INSERT; UPDATE`. This means that the update is executed regardless of whether the row already existed or not

  Note that SQLite returns undefined for created, no matter if the row was created or updated. This is because SQLite always runs INSERT OR IGNORE + UPDATE, in a single query, so there is no way to know whether the row was inserted or not.

  #### Type parameters

  - #### A

  #### Parameters

  - ##### values: Partial<A>

  - ##### Optional options: object & UpsertOptions

  #### Returns Promise<boolean>

- Inherited from Model.upsert

  - Defined in node_modules/sequelize-typescript/lib/models/Model.d.ts:378

  #### Type parameters

  - #### A

  #### Parameters

  - ##### values: Partial<A>

  - ##### Optional options: object & UpsertOptions

  #### Returns Promise<[A, boolean]>

Generated using TypeDoc