File: /var/www/api-parametros/src/app/auditor/dto/create-audit.dto.ts
import {
IsNotEmpty,
IsOptional,
IsString,
IsObject,
IsDate,
} from 'class-validator';
import { Types } from 'mongoose';
export class CreateAuditDto {
@IsNotEmpty()
readonly userId: Types.ObjectId;
@IsOptional()
@IsString()
readonly method?: string;
@IsOptional()
@IsString()
readonly url?: string;
@IsNotEmpty()
@IsObject()
readonly headers: Record<string, any>;
@IsOptional()
@IsObject()
readonly body?: Record<string, any>;
@IsOptional()
@IsObject()
readonly response?: Record<string, any>;
@IsOptional()
@IsDate()
readonly tokenExpiredAt?: Date | null;
}