package cn.ysk.cashier.mybatis.entity;


import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 积分商品设置
 *
 * @author Tankaikai tankaikai@aliyun.com
 * @since 2.0 2024-10-25
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("tb_points_goods_setting")
public class TbPointsGoodsSetting {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(type = IdType.AUTO)
    private Long id;
    /**
     * 店铺id
     */
    private Long shopId;
    /**
     * 商品类型 physical-实物 coupon-优惠劵
     */
    private String goodsCategory;
    /**
     * 商品名称
     */
    private String goodsName;
    /**
     * 商品图片URL
     */
    @TableField(value = "goods_image_url", updateStrategy = FieldStrategy.ALWAYS)
    private String goodsImageUrl;
    /**
     * 所需积分
     */
    private Integer requiredPoints;
    /**
     * 额外价格
     */
    private BigDecimal extraPrice;
    /**
     * 排序(权重)，数字越高，显示约靠前
     */
    private Integer sort;
    /**
     * 数量
     */
    private Integer quantity;
    /**
     * 商品详情
     */
    @TableField(value = "goods_description", updateStrategy = FieldStrategy.ALWAYS)
    private String goodsDescription;
    /**
     * 累计兑换数量
     */
    private Integer totalExchangeCount;
    /**
     * 是否上架 1-是 0-否
     */
    private Integer status;
    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;
    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;
    /**
     * 逻辑删除标志 1-是 0-否
     */
    private Integer delFlag;
}