import * as Sequelize from "sequelize"; import { ctx } from '../utils/iface'; import sequelize = require('sequelize'); export declare const Op: Sequelize.Operators; export declare const QueryTypes: Sequelize.QueryTypes; export declare enum Operate { Select = 0, Add = 1, Delete = 2, Save = 3 } export interface Options { fields: any[]; where: any; group: string[]; order?: string[] | string; limit?: number; offset?: number; } export default class Model { private _db; private _model; private _true_table_name; private _fields; private _table_name; transaction: Sequelize.Transaction; private _options; private _config; private _operate; static parseWhere(where: any): any; readonly changeOptions: any; config: {}; $search: {}; protected _ctx: ctx; constructor(ctx: any, Table: any, Prefix?: string); private _parse_where; private _parse_fields; private _parse_order; private _parse_config; setTableFields(fields: any): void; define(config?: {}): any; getModel(): Sequelize.Sequelize; object: () => void; addIfNotExist(data: any, where?: any): Promise; setDec(config: { [index: string]: number; }): Promise; setInc(config: { [index: string]: number; }): Promise; where(where: any): this; fields(fields: string | string[] | any, exclude?: boolean): this; order(order: string): this; select(): Promise; add(data: any): Promise; data(data: any): this; find(): Promise; addAll(data: any): Promise; count(): Promise; selectAndCount(): Promise<{ count: any; rows: any[]; }>; limit(Number: number): this; page(p: number, n: number): this; group(fields: string[]): this; del(): Promise; save(data: any): Promise; query(sql: string): any; exec(SQL: string, Type: sequelize.QueryTypes | string): any; startTrans(): Promise; setTrans(trans: Sequelize.Transaction): this; commit(): void; rollback(): void; private _clean; getFields(Fields: any, More?: boolean): Promise; }