fix: update DTO type naming

This commit is contained in:
yassinedorbozgithub
2025-01-11 17:17:05 +01:00
parent 61f159010e
commit 07fe025c6e
59 changed files with 106 additions and 113 deletions

View File

@@ -30,7 +30,7 @@ import {
import { TFilterQuery } from '@/utils/types/filter.types';
import { PageQueryDto, QuerySortDto } from '../pagination/pagination-query.dto';
import { DtoActions, DtoInfer, DtoProps } from '../types/dto.types';
import { DtoAction, DtoInfer, DtoProps } from '../types/dto.types';
import { BaseSchema } from './base-schema';
import { LifecycleHookManager } from './lifecycle-hook-manager';
@@ -456,7 +456,7 @@ export abstract class BaseRepository<
return await this.model.countDocuments(criteria).exec();
}
async create(dto: DtoInfer<DtoActions.Create, DTOCruds, U>): Promise<T> {
async create(dto: DtoInfer<DtoAction.Create, DTOCruds, U>): Promise<T> {
const doc = await this.model.create(dto);
return plainToClass(
@@ -467,7 +467,7 @@ export abstract class BaseRepository<
}
async createMany(
dtoArray: DtoInfer<DtoActions.Create, DTOCruds, U>[],
dtoArray: DtoInfer<DtoAction.Create, DTOCruds, U>[],
): Promise<T[]> {
const docs = await this.model.create(dtoArray);