import { MaybeCompositeId, Model as ObjectionModel, Pojo, StaticHookArguments } from "objection"; import type { ObjectOf } from "../../Types"; declare abstract class Model extends ObjectionModel { #private; id: MaybeCompositeId; created_at?: Date; updated_at?: Date; [key: string]: any; protected static fillable: string[]; protected static guarded: string[]; /** * Append custom attributes to external data */ protected static appends: string[]; /** * Hide attributes from external data. */ protected static hidden: string[]; protected static timestamps: boolean; protected static table: string; protected static primaryKey: string; protected attributes: ObjectOf; constructor(); static get tableName(): string; static get idColumn(): string; static beforeInsert(args: StaticHookArguments): void; static beforeUpdate(args: StaticHookArguments): void; /** * Parse data from database to Model instance. * We can get custom attribute here by running getXxxAttribute methods. */ $parseDatabaseJson(json: Pojo): Pojo; /** * Format data from internal to external * this will run on when toJson method is called. */ $formatJson(json: Pojo): Pojo; /** * Format json from internal to database. */ $formatDatabaseJson(json: Pojo): Pojo; protected static touchTimeStamps(inputItems: any[], key: string): void; /** * filter input from fillable and guarded value. */ protected static filterInput(inputItems: any[]): void; save(): Promise; getOriginal(): ObjectOf; setOriginal(original: any): void; } export declare class ExtendedModel extends Model { } export default Model;