com.github.antelopeframework.mybatis.shard.annotation.ShardOn Maven / Gradle / Ivy
package com.github.antelopeframework.mybatis.shard.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import com.github.antelopeframework.mybatis.shard.ShardTable;
/**
* 分表注解:
*
* - {@link #value()}: 要进行分表的原始表名.
* - {@link #shardNum()}: 分表数量; 默认为100.
*
*
* @author yangzhi.yzh
*
*/
@Target({ ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
@Retention(RetentionPolicy.RUNTIME)
@Inherited
@Documented
public @interface ShardOn {
/**
* 原始表名; 匹配 {@link ShardTable#setOriginalTableName(String)} 中的 originalTableName
属性.
*/
String value();
/**
* 分表数量.
*/
int shardNum() default 100;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy