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

io.github.kiryu1223.drink.annotation.Column Maven / Gradle / Ivy

There is a newer version: 1.0.5
Show newest version
package io.github.kiryu1223.drink.annotation;

import io.github.kiryu1223.drink.ext.IConverter;
import io.github.kiryu1223.drink.ext.NoConverter;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface Column
{
    /**
     * 是否为主键
     */
    boolean primaryKey() default false;

    /**
     * 数据库列名
     */
    String value() default "";

    /**
     * 转换器,用于列类型与java类型不一致的情况(比如数据库枚举=>java枚举)
     */
    Class> converter() default NoConverter.class;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy