package com.gxwebsoft.shop.entity;

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

/**
 * 秒杀订单
 *
 * @author 科技小王子
 * @since 2026-06-25
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "ShopSeckillOrder对象", description = "秒杀订单")
public class ShopSeckillOrder implements Serializable {
    private static final long serialVersionUID = 1L;

    @Schema(description = "秒杀订单ID")
    @TableId(value = "seckill_order_id", type = IdType.AUTO)
    private Integer seckillOrderId;

    @Schema(description = "秒杀活动ID")
    private Integer seckillId;

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

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

    @Schema(description = "SKU ID")
    private Integer skuId;

    @Schema(description = "购买数量")
    private Integer quantity;

    @Schema(description = "秒杀价格")
    private BigDecimal seckillPrice;

    @Schema(description = "订单编号（关联正式订单）")
    private String orderNo;

    @Schema(description = "正式订单ID（支付后关联）")
    private Integer orderId;

    @Schema(description = "订单状态：0-待支付 1-已支付 2-已取消 3-已退款")
    private Integer orderStatus;

    @Schema(description = "是否删除, 0否, 1是")
    @TableLogic
    private Integer deleted;

    @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;

}
