package com.gxwebsoft.shop.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 商品日志表
 *
 * @author 科技小王子
 * @since 2025-01-11 10:45:12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "ShopGoodsLog对象", description = "商品日志表")
public class ShopGoodsLog implements Serializable {
    private static final long serialVersionUID = 1L;

    @Schema(description = "统计ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "类型visit,cart,order,pay,collect,refund")
    private String type;

    @Schema(description = "商品ID")
    private Integer goodsId;

    @Schema(description = "是否浏览")
    private Boolean visitNum;

    @Schema(description = "加入购物车数量")
    private Integer cartNum;

    @Schema(description = "下单数量")
    private Integer orderNum;

    @Schema(description = "支付数量")
    private Integer payNum;

    @Schema(description = "支付金额")
    private BigDecimal payPrice;

    @Schema(description = "商品成本价")
    private BigDecimal costPrice;

    @Schema(description = "支付用户ID")
    private Integer payUid;

    @Schema(description = "退款数量")
    private Integer refundNum;

    @Schema(description = "退款金额")
    private BigDecimal refundPrice;

    @Schema(description = "收藏")
    private Boolean collectNum;

    @Schema(description = "排序(数字越小越靠前)")
    private Integer sortNumber;

    @Schema(description = "状态, 0正常, 1冻结")
    private Integer status;

    @Schema(description = "用户ID")
    private Integer userId;

    @Schema(description = "租户id")
    private Integer tenantId;

    @Schema(description = "注册时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

}
