import Model from './model'; export declare class RelationConfiger { name: string; table: string; fields: string[] | Function | string; pk: string; fk?: string; relation?: boolean | string | Relation; where?: Object | Function; order?: string | Function; constructor(config?: RelationConfiger); } export default class Relation { protected _one: { [index: string]: RelationConfiger; }; protected _many: { [index: string]: RelationConfiger; }; protected _extend: { [index: string]: RelationConfiger; }; protected _table: string; protected _pk: string; protected _fields: Array; protected _model: Model; protected _controller: any; protected _foreach: any; protected _ctx: any; constructor(ctx: any, Table: any, Fields?: string | Array, PK?: string); config(Table: any, Fields: any, PK: any): void; hasOne(config: RelationConfiger): this; One: RelationConfiger | any; hasMany(config: RelationConfiger): this; Many: RelationConfiger | any; extend(config: RelationConfiger): this; Extend: RelationConfiger | any; eval(w: any): any; objects(PKValues: Array): Promise<{}>; protected data_columns(arr: any, column: any): any[]; protected dataValues(arr: any, column?: any): any[]; where(where: any): this; load(DbConfig?: {} | string): void; fields(fields: any): this; selectAndCount(): Promise<[{}, any] | (number | any[])[]>; order(order: any): this; save(data: any): Promise; page(page: any, number: any): this; add(data: any): Promise; del(): Promise; select(): Promise<{}>; find(): Promise<{}>; }