All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.kasinf.framework.rest.annotation.LogicDelete Maven / Gradle / Ivy

The newest version!
package com.kasinf.framework.rest.annotation;

import java.lang.annotation.*;

/**
 * 逻辑删除注解,标记对应的字段、类型、删除的值
 * 若实体类存在继承关系,只需在顶层注解即可。
 * 子类也注解会覆盖符类的值
 *
 * @author lkhsh
 */
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface LogicDelete {
    /**
     * 指定逻辑删除的字段
     * @return 默认 isDelete
     */
    String of() default "isDelete";

    /**
     * 删除字段的类型
     * @return 默认Boolean类型
     */
    Class type() default Boolean.class;

    /**
     * 删除后的值
     * @return 默认 true
     */
    String value() default "true";
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy