/** * @file decorator.ts * @description Minimal decorator system with Symbol storage * @description Sistema de decoradores minimalista con Symbol storage */ export declare const SCHEMA: unique symbol; /** * @description Lifecycle hook types supported by models. * @description Tipos de hooks de ciclo de vida soportados por los modelos. */ export type HookType = 'beforeCreate' | 'afterCreate' | 'beforeUpdate' | 'afterUpdate' | 'beforeDestroy' | 'afterDestroy'; export interface Schema { name: string; primary_key: string; gsis: Set; hooks: Record; columns: Record any)[]; set: ((current: any, next: any) => any)[]; store: { index?: boolean; indexSort?: boolean; primaryKey?: boolean; softDelete?: boolean; createdAt?: boolean; updatedAt?: boolean; readsCurrent?: boolean; relation?: { type: 'HasMany' | 'HasOne' | 'BelongsTo' | 'ManyToMany'; model: () => any; foreignKey: string; localKey: string; relatedKey?: string; pivotTable?: string; relatedPK?: string; }; }; }>; } /** * @description Get (or lazily create) the Schema bound to a model class, with columns and hooks initialized. * @description Obtiene (o crea perezosamente) el Schema asociado a una clase de modelo, con columns y hooks inicializados. * @param ctor Model class constructor / Constructor de la clase del modelo */ export declare function getSchema(ctor: any): Schema; /** * @description Factory to create decorators with argument support and composition * @description Factory para crear decoradores con soporte de argumentos y composición */ export declare function decorator(callback: (table_class: any, col: Schema['columns'][string], params: any[]) => void): (...params: any[]) => (target: any, propertyKey: string | symbol) => void;