Files
timi-spring/src/main/java/com/imyeyu/spring/annotation/table/DeleteColumn.java
2026-01-04 17:27:36 +08:00

43 lines
719 B
Java

package com.imyeyu.spring.annotation.table;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* 标记逻辑删除字段并指定存储类型
*
* @author 夜雨
* @since 2025-12-01 10:56
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface DeleteColumn {
/**
* 逻辑删除的存储类型
*
* @return 存储类型
*/
Type value() default Type.UNIX;
/**
* 逻辑删除的时间类型
*
* @author 夜雨
* @since 2025-12-01 10:57
*/
enum Type {
/** 毫秒时间戳 */
UNIX,
/** 日期 */
DATE,
/** 日期时间 */
DATE_TIME
}
}