@Data @TableName("user") public class User { // 将属性所对应的字段指定为主键 // @TableId注解的value属性用于指定主键的字段 // @TableId注解的type属性用于指定主键的类型 IdType.Auto表示自增,IdType.INPUT表示用户输入 @TableId(value = "id",type = IdType.AUTO) private Long id; // @TableField注解用于指定字段不是表的字段,但是需要查询的时候使用 @TableField(value = "name") private String name; private Integer age; private String email; // @TableLogic注解用于指定该字段是逻辑删除字段 @TableLogic private Integer isDeleted; }
mybatis_plus注解及设置
于 2022-06-20 15:17:20 首次发布