2023-08-24 21:28:50 +02:00
|
|
|
import { EntityType } from '@app/infra/entities';
|
|
|
|
import { ApiProperty } from '@nestjs/swagger';
|
|
|
|
import { Type } from 'class-transformer';
|
2023-09-01 18:40:00 +02:00
|
|
|
import { IsDate, IsEnum, IsUUID } from 'class-validator';
|
|
|
|
import { Optional } from '../domain.util';
|
2023-08-24 21:28:50 +02:00
|
|
|
|
|
|
|
export class AuditDeletesDto {
|
|
|
|
@IsDate()
|
|
|
|
@Type(() => Date)
|
|
|
|
after!: Date;
|
|
|
|
|
|
|
|
@ApiProperty({ enum: EntityType, enumName: 'EntityType' })
|
|
|
|
@IsEnum(EntityType)
|
|
|
|
entityType!: EntityType;
|
|
|
|
|
2023-09-01 18:40:00 +02:00
|
|
|
@Optional()
|
2023-08-24 21:28:50 +02:00
|
|
|
@IsUUID('4')
|
|
|
|
@ApiProperty({ format: 'uuid' })
|
|
|
|
userId?: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export class AuditDeletesResponseDto {
|
|
|
|
needsFullSync!: boolean;
|
|
|
|
ids!: string[];
|
|
|
|
}
|