dto.ts 750 B

12345678910111213141516171819202122232425262728293031323334
  1. import { ApiProperty } from '@nestjs/swagger';
  2. import { ArrayMinSize, IsArray, IsNotEmpty, IsString } from 'class-validator';
  3. export class ConnectMilvus {
  4. @ApiProperty({
  5. description: 'Milvus url',
  6. })
  7. @IsString()
  8. @IsNotEmpty({
  9. message: 'address is empty',
  10. })
  11. readonly address: string;
  12. }
  13. export class CheckMilvus {
  14. @ApiProperty({
  15. description: 'Milvus url',
  16. })
  17. @IsString()
  18. @IsNotEmpty({
  19. message: 'address is empty',
  20. })
  21. readonly address: string;
  22. }
  23. export class Flush {
  24. @ApiProperty({
  25. description:
  26. 'The collection names you want flush, flush will flush data into disk.',
  27. })
  28. @IsArray()
  29. @ArrayMinSize(1, { message: 'At least need one collection name.' })
  30. readonly collection_names: string[];
  31. }