JAVA-实战8 Redis实战项目—雷神点评(附加)数据实体类

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_blog_comments")
@NoArgsConstructor
@AllArgsConstructor
public class BlogCommentData implements Serializable {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private Long userId;
    private Long blogId;
    private Long parentId;
    private Long answerId;
    private String content;
    private Integer liked;
    private Boolean status;
    private LocalDateTime createTime;
    private LocalDateTime updateTime;

}
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_blog")
@NoArgsConstructor
@AllArgsConstructor
public class BlogData implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private Long shopId;
    private Long userId;

    @TableField(exist = false)
    private String icon;

    @TableField(exist = false)
    private String name;

    @TableField(exist = false)
    private Boolean isLike;

    private String title;
    private String images;
    private String content;
    private Integer liked;
    private Integer comments;
    private LocalDateTime createTime;
    private LocalDateTime updateTime;
   
}
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_follow")
@NoArgsConstructor
@AllArgsConstructor
public class FollowData implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private Long userId;
    private Long followUserId;
    private LocalDateTime createTime;
}
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_like")
@NoArgsConstructor
@AllArgsConstructor
public class LikeData {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private Long blogId;
    private Long userId;

    private Long likedCount;
}
@Data
@NoArgsConstructor
@AllArgsConstructor
public class LoginFormData {
    private String phone;
    private String code;
    private String password;
}
@Data
public class ResultData {
    private Integer code; //编码:1成功,0为失败
    private String msg; //错误信息
    private Object data; //数据

    public static ResultData success() {
        ResultData result = new ResultData();
        result.code = 1;
        result.msg = "success";
        return result;
    }

    public static ResultData success(Object object) {
        ResultData result = new ResultData();
        result.data = object;
        result.code = 1;
        result.msg = "success";
        return result;
    }

    public static ResultData error(String msg) {
        ResultData result = new ResultData();
        result.msg = msg;
        result.code = 0;
        return result;
    }
}
@Data
public class ScrollResult {
    private List<?> list;
    private Long minTime;
    private Integer offset;
}
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
@TableName("tb_shop")
public class ShopData{

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    private String name;
    private Long typeId;
    private String images;
    private String area;
    private String address;
    private Double x;
    private Double y;
    private Long avgPrice;
    private Integer sold;
    private Integer comments;
    private Integer score;
    private String openHours;
    private LocalDateTime createTime;
    private LocalDateTime updateTime;

    @TableField(exist = false)
    private Double distance;
}
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserBaseData {
    private String id;
    private String nickName;
    private String icon = "";
}
@TableName("tb_user")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserData {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private String phone;
    private String password;
    private String nickName;
    private String icon = "";
    private LocalDateTime createTime;
    private LocalDateTime updateTime;
}
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_voucher")
@AllArgsConstructor
@NoArgsConstructor
public class VoucherData implements Serializable {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private Long shopId;
    private String title;
    private String subTitle;
    private String rules;
    private Long payValue;
    private Long actualValue;
    private Integer type;
    private Integer status;

    @TableField(exist = false)
    private Integer stock;

    @TableField(exist = false)
    private LocalDateTime beginTime;

    @TableField(exist = false)
    private LocalDateTime endTime;

    private LocalDateTime createTime;
    private LocalDateTime updateTime;
}
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_voucher_order")
@NoArgsConstructor
@AllArgsConstructor
public class VoucherOrderData implements Serializable {

    @TableId(value = "id", type = IdType.INPUT)
    private Long id;

    private Long userId;
    private Long voucherId;
    private Integer payType;
    private Integer status;
    private LocalDateTime createTime;
    private LocalDateTime payTime;
    private LocalDateTime useTime;
    private LocalDateTime refundTime;
    private LocalDateTime updateTime;
}
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_seckill_voucher")
@AllArgsConstructor
@NoArgsConstructor
public class VoucherSecondKillData {
    @TableId(value = "voucher_id", type = IdType.INPUT)
    private Long voucherId;

    private Integer stock;
    private LocalDateTime createTime;
    private LocalDateTime beginTime;
    private LocalDateTime endTime;
    private LocalDateTime updateTime;
}

posted @ 2026-05-09 22:48  tcswuzb  阅读(7)  评论(0)    收藏  举报