@deep/nest-kit
    Preparing search index...
    interface EntityWithId {
        id: string;
        hasId(): boolean;
        recover(options?: SaveOptions): Promise<EntityWithId>;
        reload(): Promise<void>;
        remove(options?: RemoveOptions): Promise<EntityWithId>;
        save(options?: SaveOptions): Promise<EntityWithId>;
        softRemove(options?: SaveOptions): Promise<EntityWithId>;
    }

    Hierarchy

    • BaseEntity
      • EntityWithId
    Index

    Properties

    id: string

    Methods

    • Checks if entity has an id. If entity composite compose ids, it will check them all.

      Returns boolean

    • Recovers a given entity in the database.

      Parameters

      • Optionaloptions: SaveOptions

      Returns Promise<EntityWithId>

    • Reloads entity data from the database.

      Returns Promise<void>

    • Removes current entity from the database.

      Parameters

      • Optionaloptions: RemoveOptions

      Returns Promise<EntityWithId>

    • Saves current entity in the database. If entity does not exist in the database then inserts, otherwise updates.

      Parameters

      • Optionaloptions: SaveOptions

      Returns Promise<EntityWithId>

    • Records the delete date of current entity.

      Parameters

      • Optionaloptions: SaveOptions

      Returns Promise<EntityWithId>