Apply consistent import ordering and indentation in frontend and backend files. Ensure better maintainability and adherence to code style standards.
33 lines
492 B
TypeScript
33 lines
492 B
TypeScript
import {
|
|
IsEnum,
|
|
IsOptional,
|
|
IsString,
|
|
IsUUID,
|
|
MaxLength,
|
|
} from "class-validator";
|
|
|
|
export enum ReportReason {
|
|
INAPPROPRIATE = "inappropriate",
|
|
SPAM = "spam",
|
|
COPYRIGHT = "copyright",
|
|
OTHER = "other",
|
|
}
|
|
|
|
export class CreateReportDto {
|
|
@IsOptional()
|
|
@IsUUID()
|
|
contentId?: string;
|
|
|
|
@IsOptional()
|
|
@IsUUID()
|
|
tagId?: string;
|
|
|
|
@IsEnum(ReportReason)
|
|
reason!: "inappropriate" | "spam" | "copyright" | "other";
|
|
|
|
@IsOptional()
|
|
@IsString()
|
|
@MaxLength(1000)
|
|
description?: string;
|
|
}
|