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