# Entity Class

Module
import { Entity } from "@tsed/core"
Source/packages/core/src/class/Entity.ts

# Overview

abstract class Entity {
    /**
     * Original property key decorated by the decorator
     */
    readonly propertyKey: string | symbol;
    /**
     * Alias of the property
     */
    readonly propertyName: string;
    /**
     * Parameter index
     */
    readonly index: number;
    /**
     * Method's descriptor
     */
    readonly descriptor: number;
    /**
     * Decorator type used to the JsonSchemaStore.
     */
    readonly decoratorType: DecoratorTypes;
    /**
     * Type of the collection (Array, Map, Set, etc...)
     */
    collectionType: Type<any>;
    token: Type<any>;
    /**
     *
     */
    protected _type: Type<any>;
    protected _target: Type<any>;
    protected constructor({ target, propertyKey, descriptor, index }: EntityOptions);
    /**
     * Reference to the class
     */
    get target(): Type<any>;
    /**
     * Return the class name of the entity.
     * @returns {string}
     */
    get targetName(): string;
    /**
     * Return the collection name
     * @returns {string}
     * @todo should not be use in final API
     */
    get collectionName(): string;
    /**
     *
     * @returns {Type<any>}
     */
    get type(): Type<any> | any;
    /**
     * Get original type without transformation
     * @param value
     */
    set type(value: Type<any> | any);
    /**
     * Return target type name
     * @returns {string}
     * @todo should not be use in final API
     */
    get typeName(): string;
    /**
     * Return the itemSchema target type. if the type is a function used for recursive model, the function will be called to
     * get the right type.
     */
    get computedType(): Type<any>;
    /**
     *
     * @returns {boolean}
     */
    get isCollection(): boolean;
    /**
     *
     * @returns {boolean}
     */
    get isArray(): boolean;
    /**
     *
     * @returns {boolean}
     */
    get isPrimitive(): boolean;
    /**
     *
     * @returns {boolean}
     */
    get isDate(): boolean;
    /**
     *
     * @returns {boolean}
     */
    get isObject(): boolean;
    /**
     *
     */
    get isClass(): boolean;
}