typeorm
Version:
Data-Mapper ORM for TypeScript and ES2023+. Supports MySQL/MariaDB, PostgreSQL, MS SQL Server, Oracle, SAP HANA, SQLite, MongoDB databases.
21 lines (20 loc) • 594 B
TypeScript
import type { ObjectLiteral } from "../../common/ObjectLiteral";
import type { EntityMetadata } from "../../metadata/EntityMetadata";
import type { BaseEvent } from "./BaseEvent";
/**
* InsertEvent is an object that broadcaster sends to the entity subscriber when entity is inserted to the database.
*/
export interface InsertEvent<Entity> extends BaseEvent {
/**
* Inserting event.
*/
entity: Entity;
/**
* Id or ids of the entity being inserted.
*/
entityId?: ObjectLiteral;
/**
* Metadata of the entity.
*/
metadata: EntityMetadata;
}