UNPKG

tspace-mysql

Version:

Tspace MySQL is a promise-based ORM for Node.js, designed with modern TypeScript and providing type safety for schema databases.

28 lines (27 loc) 935 B
import { Model } from "../Model"; import { Blueprint } from '../Blueprint'; import type { T } from "../UtilityTypes"; declare const schema: { id: Blueprint<number>; uuid: Blueprint<string | null>; model: Blueprint<string>; query: Blueprint<string>; event: Blueprint<string>; user_id: Blueprint<number>; metadata: Blueprint<string | Record<string, any> | null>; auditable_ids: Blueprint<string | null>; old_values: Blueprint<string | Record<string, any> | null>; new_values: Blueprint<string | Record<string, any> | null>; created_at: Blueprint<string | Date | null>; updated_at: Blueprint<string | Date | null>; }; type TS = T.Schema<typeof schema>; declare class Audit extends Model<TS> { protected boot(): void; static tracking(instance: Model, { sql, fn }: { sql: string; fn: () => Promise<any>; }): Promise<any>; } export { Audit }; export default Audit;