0.1.0Updated 2 months ago
declare namespace DB {
  interface Entity {
    id?: number
    created_at?: Date
    __parent_class?: string
  }

  namespace Entity {
    type Class = import('../../classes/entity.ts').Entity
    type typeofClass = typeof import('../../classes/entity.ts').Entity

    // deno-lint-ignore no-explicit-any
    type Constructor<T> = typeofClass & (new (...args: any[]) => T);


    type EntitySpecificFields = '__clean' | 'emit' | 'on' | 'off' | 'once' | 'save' | 'EntityClass'

    type Clean<T> = Omit<T, EntitySpecificFields>
  }
}