import { Model } from '../../base/index.js'; import { DocumentDatabase } from './database.js'; import { DocumentQueryResult } from '../../types.js'; /** * 文档型模型类 * 继承自 Model,提供文档型数据库特有的操作 */ export declare class DocumentModel = Record, T extends keyof S = keyof S> extends Model { constructor(database: DocumentDatabase, name: T); /** * 创建文档 */ create(document: S[T]): Promise; create(documents: S[T][]): Promise<(S[T] & { _id: string; })[]>; /** * 查找单个文档 */ selectOne(...fields: Array): Promise<(Pick & { _id: string; }) | null>; /** * 根据ID查找文档 */ selectById(id: string): Promise; /** * 根据ID更新文档 */ updateById(id: string, update: Partial): Promise; /** * 根据ID删除文档 */ deleteById(id: string): Promise; /** * 生成文档ID */ private generateId; } //# sourceMappingURL=model.d.ts.map