import { UniqueEntityId } from "Utilities/Ids/UniqueEntityId";
2
3
/**
4
* Abstract Entity class
5
*/
6
export abstract class Entity<T> {
7
/**
8
* Id of the entity
9
*/
10
protected readonly _id: UniqueEntityId;
11
12
/**
13
* Collection of properties
14
*/
15
protected readonly props: T;
16
17
/**
18
* @param T props
19
* @param IEntityDefinition definition Needed for each specific entity overriding this entity. The child entity should not expose this parameter in its own constructor
20
* @param UniqueEntityId id If not sent, it generates a UUID