import { ApiProperty, ApiBody, PartialType } from '@nestjs/swagger';
import { Exclude } from 'class-transformer';
import {
  Allow,
  IsArray,
  IsBoolean,
  IsNotEmpty,
  IsNumber,
  IsOptional,
  IsString,
  Length,
} from 'class-validator';

export class CreateOperationLogDto {
  @ApiProperty()
  @IsString()
  @IsNotEmpty({ message: '标题不能为空' })
  title: string;

  @ApiProperty()
  @IsString()
  @IsOptional()
  requestUrl?: string;

  @ApiProperty()
  @IsString()
  @IsOptional()
  ip?: string;

  @ApiProperty()
  @IsString()
  @IsOptional()
  method?: string;

  @ApiProperty()
  @IsNumber()
  @IsNotEmpty({ message: 'userId不能为空' })
  userId: number;
}
