import type { DeepPartial , Manager } from "./manager.ts" ; import type { ModelQuery } from "./modelquery.ts" ; export type ObjectType < T > = typeof BaseModel & { new ( ) : T ; } ; /**
 * Manage your models directly from the model class.
 */ export abstract class BaseModel { private static manager : Manager ; param options public static query < T extends BaseModel > ( this ) { return this . manager . query ( this ) ; } /**
     * Saves current model to the database.
     */ public save ( ) { const modelClass = < typeof BaseModel > this . constructor ; return modelClass . manager . save ( this ) ; } /**
     * Remove current model from the database.
     */ public remove ( ) { const modelClass = < typeof BaseModel > this . constructor ; return modelClass . manager . remove ( this ) ; } }