30 lines
489 B
TypeScript
30 lines
489 B
TypeScript
import { IsString, IsObject, IsOptional, IsNumber } from 'class-validator';
|
|
|
|
export class mongoSetValidator {
|
|
@IsString()
|
|
collectionName: string;
|
|
|
|
@IsObject()
|
|
data: object;
|
|
}
|
|
|
|
export class mongoGetValidator {
|
|
@IsString()
|
|
collectionName: string;
|
|
|
|
@IsString()
|
|
@IsOptional()
|
|
regexKey: string;
|
|
|
|
@IsObject()
|
|
@IsOptional()
|
|
filter: object;
|
|
|
|
@IsNumber()
|
|
@IsOptional()
|
|
limit: number;
|
|
|
|
@IsNumber()
|
|
@IsOptional()
|
|
skip: number;
|
|
} |