import { z } from "zod"; import type { ModelBuilder } from "./ModelBuilder.js"; import { BaseModel, type IModelData } from "./BaseModel.js"; export type { IModelInput, IModelData } from "./BaseModel.js"; export type IModel> = BaseModel & z.infer; /** * Builder builds the model class (not an instance). * It knows both the schema and the public model interface. */ export interface IModelBuilder> { buildModel(): Promise>; } /** * Factory creates model instances. * It directly produces the model with the correct schema and public interface. */ export interface IModelFactory> { create(data: IModelData): Promise; }