/**
 * Decorator (Annotation `@DatabaseEntity()`) to set the string ENTITY_TYPE to an Entity Type.
 *
 * also see  {@link /additional-documentation/how-to-guides/create-a-new-entity-type.html} param entityType import { DynamicEntityService } from "./dynamic-entity.service" ; export function DatabaseEntity ( entityType ) { return ( constructor ) => { DynamicEntityService . registerNewEntity ( entityType , constructor ) ; constructor . ENTITY_TYPE = entityType ; const parentConstructor = Object . getPrototypeOf ( constructor ) ; parentConstructor . schema . forEach ( ( value , key ) => constructor . schema . set ( key , value ) ) ; } ; }