package com.czg.account.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import com.mybatisflex.core.keygen.KeyGenerators;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 积分商品设置
 *
 * @author Tankaikai tankaikai@aliyun.com
 * @since 1.0 2025-02-25
 */
@Data
@Table("tb_points_goods_setting")
public class PointsGoodsSetting implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @Id(keyType = KeyType.Generator, value = KeyGenerators.snowFlakeId)
    private Long id;
    /**
     * 店铺id
     */
    private Long shopId;
    /**
     * 商品类型 physical-实物 coupon-优惠劵
     */
    private String goodsCategory;
    /**
     * 商品名称
     */
    private String goodsName;
    /**
     * 商品图片URL
     */
    private String goodsImageUrl;
    /**
     * 所需积分
     */
    private Integer requiredPoints;
    /**
     * 额外价格
     */
    private BigDecimal extraPrice;
    /**
     * 排序(权重)，数字越高，显示约靠前
     */
    private Integer sort;
    /**
     * 数量
     */
    private Integer quantity;
    /**
     * 商品详情
     */
    private String goodsDescription;
    /**
     * 累计兑换数量
     */
    private Integer totalExchangeCount;
    /**
     * 是否上架 1-是 0-否
     */
    private Integer status;
    /**
     * 创建时间
     */
    @Column(onInsertValue = "now()")
    private LocalDateTime createTime;
    /**
     * 更新时间
     */
    @Column(onInsertValue = "now()", onUpdateValue = "now()")
    private LocalDateTime updateTime;
    /**
     * 逻辑删除标志 1-是 0-否
     */
    @Column(onInsertValue = "0")
    private Integer delFlag;
}