Skip to main content

Abstract Class: BaseEntity

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

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

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:53

Parameters​

other?​

Partial<BaseEntity>

Returns​

BaseEntity

Properties​

dateCreated​

dateCreated: Date

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

The date and time that the entity was created.


dateModified​

dateModified: Date

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

The date and time that the entity was last modified.


uid​

uid: string

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

The universally unique identifier of the entity.


version​

version: number = 0

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

The optimistic lock version.