mirror of
https://gitee.com/dromara/MilvusPlus.git
synced 2025-12-07 17:38:24 +08:00
docs: 优化annotation下所有注解的注释
This commit is contained in:
parent
a65532c71c
commit
1d95b66053
@ -4,6 +4,7 @@ import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* @author xgc
|
||||
**/
|
||||
@ -11,5 +12,6 @@ import java.lang.annotation.Target;
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface ExtraParam {
|
||||
String key();
|
||||
|
||||
String value();
|
||||
}
|
||||
@ -4,11 +4,15 @@ import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* @author xgc
|
||||
**/
|
||||
@Target(ElementType.TYPE)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface MilvusCollection {
|
||||
String name(); // 集合的名称
|
||||
/**
|
||||
* 集合的名称
|
||||
*/
|
||||
String name();
|
||||
}
|
||||
@ -6,6 +6,7 @@ import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* @author xgc
|
||||
**/
|
||||
@ -13,14 +14,57 @@ import java.lang.annotation.Target;
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface MilvusField {
|
||||
|
||||
String name() default ""; // 字段名称,默认使用 Java 字段名
|
||||
DataType dataType() default DataType.FloatVector; // 数据类型,默认为 FLOAT_VECTOR
|
||||
int dimension() default -1; // 向量维度,仅对向量类型有效
|
||||
boolean isPrimaryKey() default false; // 是否为主键
|
||||
boolean autoID() default false; // 是否自动生成
|
||||
String description() default ""; // 字段描述
|
||||
DataType elementType() default DataType.None; // 数组或集合中元素的类型,默认为 INVALID
|
||||
int maxLength() default -1; // 数组或字符串类型的最大长度,默认为 -1(不指定)
|
||||
int maxCapacity() default -1; // 集合类型的最大容量,默认为 -1(不指定)
|
||||
boolean isPartitionKey() default false; // 是否为分区键
|
||||
/**
|
||||
* 字段名称,默认使用 Java 字段名
|
||||
*/
|
||||
String name() default "";
|
||||
|
||||
/**
|
||||
* 数据类型,默认为 FLOAT_VECTOR
|
||||
*
|
||||
* @see DataType
|
||||
*/
|
||||
DataType dataType() default DataType.FloatVector;
|
||||
|
||||
/**
|
||||
* 向量维度,仅对向量类型有效
|
||||
*/
|
||||
int dimension() default -1;
|
||||
|
||||
/**
|
||||
* 是否为主键
|
||||
*/
|
||||
boolean isPrimaryKey() default false;
|
||||
|
||||
/**
|
||||
* 是否自动生成
|
||||
*/
|
||||
boolean autoID() default false;
|
||||
|
||||
/**
|
||||
* 字段描述
|
||||
*/
|
||||
String description() default "";
|
||||
|
||||
/**
|
||||
* 数组或集合中元素的类型,默认为 INVALID
|
||||
*
|
||||
* @see DataType
|
||||
*/
|
||||
DataType elementType() default DataType.None;
|
||||
|
||||
/**
|
||||
* 数组或字符串类型的最大长度
|
||||
*/
|
||||
int maxLength() default -1;
|
||||
|
||||
/**
|
||||
* 集合类型的最大容量
|
||||
*/
|
||||
int maxCapacity() default -1;
|
||||
|
||||
/**
|
||||
* 是否为分区键
|
||||
*/
|
||||
boolean isPartitionKey() default false;
|
||||
}
|
||||
@ -11,5 +11,8 @@ import java.lang.annotation.Target;
|
||||
@Target(ElementType.TYPE)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface MilvusPartition {
|
||||
String[] name(); // 分区的名称
|
||||
/**
|
||||
* 分区的名称
|
||||
*/
|
||||
String[] name();
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user