UNPKG

@dazejs/framework

Version:

Daze.js - A powerful web framework for Node.js

14 lines (13 loc) 660 B
import { Builder } from '../database/builder'; import { ModelBuilder } from './builder'; import { Repository } from './repository'; export declare class BaseEntity { get(id: number | string): Promise<Repository<this> & this>; createQueryBuilder(): ModelBuilder<this> & Builder; with(relation: string, callback?: (query: ModelBuilder<this> & Builder) => void): Repository<this> & this; withTrashed(): Repository<this> & this; withSecret(): Repository<this> & this; save(): Promise<any>; create(attributes: Partial<Record<keyof this, any>>): Promise<Repository<this> & this>; destroy(...ids: (number | string)[]): Promise<any>; }