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

org.test4j.module.database.annotations.ColumnDef Maven / Gradle / Ivy

There is a newer version: 1.1.2
Show newest version
package org.test4j.module.database.annotations;

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

/**
 * ColumnDef: 字段定义
 *
 * @author darui.wu
 */
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface ColumnDef {
    /**
     * 字段名称
     *
     * @return ignore
     */
    String value() default "";

    /**
     * 数据库字段类型
     *
     * @return ignore
     */
    String type();

    /**
     * 是否主键
     *
     * @return ignore
     */
    boolean primary() default false;

    /**
     * 是否自增
     *
     * @return ignore
     */
    boolean autoIncrease() default false;

    /**
     * 允许字段为null
     *
     * @return ignore
     */
    boolean notNull() default false;

    /**
     * 默认值
     *
     * @return ignore
     */
    String defaultValue() default "";
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy