Skip to main content

Abstract Class: BaseEntity

Defined in: service-core/src/models/BaseEntity.ts:18

Provides a common base class for all entity's that will be persisted to a datastore.

Note that the @CreateDateColumn, @UpdateDateColumn, and @VersionColumn decorators from TypeORM are not supported because they are not implemented in TypeORM's MongoDB support. They are instead implemented directly by this library as part of ModelRoute.

Extended by

Constructors

Constructor

new BaseEntity(other?): BaseEntity

Defined in: service-core/src/models/BaseEntity.ts:52

Parameters

other?

Partial<BaseEntity>

Returns

BaseEntity

Properties

dateCreated

dateCreated: Date

Defined in: service-core/src/models/BaseEntity.ts:35

The date and time that the entity was created.


dateModified

dateModified: Date

Defined in: service-core/src/models/BaseEntity.ts:43

The date and time that the entity was last modified.


uid

uid: string

Defined in: service-core/src/models/BaseEntity.ts:27

The universally unique identifier of the entity.


version

version: number = 0

Defined in: service-core/src/models/BaseEntity.ts:50

The optimistic lock version.