UNPKG

cnpmcore

Version:

Private NPM Registry for Enterprise

16 lines (15 loc) 783 B
import type { EggProtoImplClass } from 'egg'; import type { LeoricBone } from './leoric.ts'; interface BonePatchInfo { id?: bigint; updatedAt?: Date; createdAt?: Date; } type PatchedBone = LeoricBone & BonePatchInfo; export declare class ModelConvertor { static convertEntityToModel<T extends PatchedBone>(entity: object, ModelClazz: EggProtoImplClass<T>, options?: object): Promise<T>; static convertEntityToChanges<T extends LeoricBone>(entity: object, ModelClazz: EggProtoImplClass<T>): Record<string, unknown>; static saveEntityToModel<T extends LeoricBone>(entity: object, model: T & PatchedBone, options?: object): Promise<boolean>; static convertModelToEntity<T>(bone: LeoricBone, entityClazz: EggProtoImplClass<T>, data?: object): T; } export {};