48 lines
765 B
TypeScript
48 lines
765 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;
|
|
}
|
|
|
|
|
|
export class eventSetValidator {
|
|
@IsString()
|
|
usersUUID: string;
|
|
|
|
@IsObject()
|
|
event: Record<string, Record<string, Record<string, string>>>;
|
|
}
|
|
|
|
export class eventGetValidator {
|
|
@IsString()
|
|
usersUUID: string;
|
|
|
|
@IsString()
|
|
typeToken: string;
|
|
}
|