注释类型 Column


  • @Target(FIELD)
    @Retention(RUNTIME)
    public @interface Column
    字段
    作者:
    FzmXer 2024年01月19日 12时52分
    • 可选元素概要

      可选元素 
      修饰符和类型 可选元素 说明
      boolean automatic
      是否自增 primaryKey() 为true才生效
      java.lang.String comments
      字段注释
      boolean exist
      是否映射
      int length
      字段长度 比如 int(1) - varchar(32)
      java.lang.String name
      字段名
      boolean nullable
      允许为空
      boolean primaryKey
      主键
      DataType type
      字段类型 (默认自动推断,但是不一定准确)
      boolean unique
      值是否唯一
      boolean where
      是否作为查询条件
    • 元素详细资料

      • name

        java.lang.String name
        字段名
        返回:
        字段名
        默认值:
        ""
      • exist

        boolean exist
        是否映射
        返回:
        映射
        默认值:
        true
      • type

        DataType type
        字段类型 (默认自动推断,但是不一定准确)
        返回:
        类型
        默认值:
        cn.fxcraft.orm.enums.DataType.NONE
      • length

        int length
        字段长度 比如 int(1) - varchar(32)
        返回:
        长度
        默认值:
        0
      • nullable

        boolean nullable
        允许为空
        返回:
        默认值:
        true
      • comments

        java.lang.String comments
        字段注释
        返回:
        注释
        默认值:
        ""
      • unique

        boolean unique
        值是否唯一
        返回:
        唯一
        默认值:
        false
      • primaryKey

        boolean primaryKey
        主键
        返回:
        主键
        默认值:
        false
      • automatic

        boolean automatic
        是否自增 primaryKey() 为true才生效
        返回:
        自增
        默认值:
        false
      • where

        boolean where
        是否作为查询条件
        返回:
        条件
        默认值:
        false