|
@@ -1,9 +1,9 @@
|
|
import { ApiProperty } from '@nestjs/swagger';
|
|
import { ApiProperty } from '@nestjs/swagger';
|
|
-import { IsNotEmpty, IsString } from 'class-validator';
|
|
|
|
|
|
+import { ArrayMinSize, IsArray, IsNotEmpty, IsString } from 'class-validator';
|
|
|
|
|
|
export class ConnectMilvus {
|
|
export class ConnectMilvus {
|
|
@ApiProperty({
|
|
@ApiProperty({
|
|
- description: 'Milvus url'
|
|
|
|
|
|
+ description: 'Milvus url',
|
|
})
|
|
})
|
|
@IsString()
|
|
@IsString()
|
|
@IsNotEmpty({
|
|
@IsNotEmpty({
|
|
@@ -14,7 +14,7 @@ export class ConnectMilvus {
|
|
|
|
|
|
export class CheckMilvus {
|
|
export class CheckMilvus {
|
|
@ApiProperty({
|
|
@ApiProperty({
|
|
- description: 'Milvus url'
|
|
|
|
|
|
+ description: 'Milvus url',
|
|
})
|
|
})
|
|
@IsString()
|
|
@IsString()
|
|
@IsNotEmpty({
|
|
@IsNotEmpty({
|
|
@@ -22,3 +22,13 @@ export class CheckMilvus {
|
|
})
|
|
})
|
|
readonly address: string;
|
|
readonly address: string;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+export class Flush {
|
|
|
|
+ @ApiProperty({
|
|
|
|
+ description:
|
|
|
|
+ 'The collection names you want flush, flush will flush data into disk.',
|
|
|
|
+ })
|
|
|
|
+ @IsArray()
|
|
|
|
+ @ArrayMinSize(1, { message: 'At least need one collection name.' })
|
|
|
|
+ readonly collection_names: string[];
|
|
|
|
+}
|