实体类 @TableName

//指向表table_biao
@TableName("table_biao)
public class UserThirdLogin extends Model<UserThirdLogin>{
     private static final long serialVersionUID = 1L;    

    //指向表中的id
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 用户的id
     */
    //指向表中user_id字段,点表中的字段与所使用的字段不一样时使用,比如user_id(表)和userId(用)
    @TableField("user_id")
    private Integer userId;
    /**
     * 昵称
     */
    @TableField(value="create_date", fill = FieldFill.INSERT)
    protected Date createDate
}


版权声明:本文为wenchangwenliu原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。