import { EntityQuery } from './EntityQuery'; import { ChildObject, KeysOfType } from '../Support'; import { EntityMetadata, ID } from './Decorators'; import { BelongsTo, BelongsToMany, HasMany, HasOne } from './Fields'; import { BooleanOperator, Direction, Operator, WhereFunction, WhereValue } from './Types'; import { DotNotationProperties, EntityConstructor, EntityKeys, EntityObject } from './index'; import { Query } from './Query'; import { List } from './List'; export declare abstract class Entity { exists: boolean; original: Record; constructor(); static get metadata(): EntityMetadata; get metadata(): EntityMetadata; get static(): EntityConstructor; static where>(this: EntityConstructor, column: EntityKeys, operator: Operator | Query | WhereValue | T[K], value?: Query | WhereValue | T[K], boolean?: BooleanOperator): EntityQuery; static whereIn>(this: EntityConstructor, column: EntityKeys, value: Query | WhereValue[] | T[K][], boolean?: BooleanOperator): EntityQuery; static whereNotIn>(this: EntityConstructor, column: EntityKeys, value: Query | WhereFunction | WhereValue[] | T[K][]): EntityQuery; static whereLike>(this: EntityConstructor, column: EntityKeys, value?: WhereValue | T[K], boolean?: BooleanOperator): EntityQuery; static first>(this: EntityConstructor, ...columns: EntityKeys[]): Promise; static firstOrNew(this: EntityConstructor, properties: Partial>, values?: Partial>): Promise; static firstOrCreate(this: EntityConstructor, properties: Partial>, values?: Partial>): Promise; static orderBy>(this: EntityConstructor, column: EntityKeys, direction?: Direction): EntityQuery; static getTable(this: EntityConstructor): string; static new(this: EntityConstructor, data: Partial> | {}, exists?: boolean): T; static create(this: EntityConstructor, data?: ChildObject | {}): Promise; static insert(this: EntityConstructor, data: (ChildObject | {})[]): Promise; static get(this: EntityConstructor, ...columns: EntityKeys[]): Promise; static with(this: EntityConstructor, ...relations: (KeysOfType | HasOne | HasMany | BelongsToMany> | DotNotationProperties | [ KeysOfType | HasOne | HasMany | BelongsToMany> | DotNotationProperties, (Query: EntityQuery) => void ])[]): EntityQuery; static withCount>>(this: EntityConstructor, ...relations: (KeysOfType | HasOne | HasMany | BelongsToMany> | DotNotationProperties | [ KeysOfType | HasOne | HasMany | BelongsToMany> | DotNotationProperties, (Query: EntityQuery) => void ])[]): EntityQuery; static find(this: EntityConstructor, id: string | number | ID): Promise; static findOrFail(this: EntityConstructor, id: string | number | ID): Promise; static getPrimaryKey(): EntityKeys; static hydrate(modelType: EntityConstructor, models: Partial>[], exist?: boolean): T[]; static newQuery(this: EntityConstructor): EntityQuery; getTable(): string; load(...relations: (KeysOfType | HasOne | HasMany | BelongsToMany> | DotNotationProperties | [ KeysOfType | HasOne | HasMany | BelongsToMany> | DotNotationProperties, (Query: EntityQuery) => void ])[]): Promise; loadCount>>(...relations: (KeysOfType | HasOne | HasMany | BelongsToMany> | DotNotationProperties | [ KeysOfType | HasOne | HasMany | BelongsToMany> | DotNotationProperties, (Query: EntityQuery) => void ])[]): Promise; newQuery(this: T): EntityQuery; static delete(this: EntityConstructor, ...ids: [ID, ...ID[]]): Promise; private getDataToSave; fill(data: ChildObject | object): this; delete(): Promise; static truncate(this: EntityConstructor): Promise; save(data?: ChildObject | object): Promise; getPrimaryKey(this: T): EntityKeys; getPrimaryKeyValue(this: T): ID; toJSON(): { [K in keyof this]: this[K]; }; private updateTimestamps; private convertValueByType; } //# sourceMappingURL=Entity.d.ts.map