
package com.tmerclub.cloud.product.model;

import com.tmerclub.cloud.common.model.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.io.Serial;
import java.io.Serializable;


/**
 * 库存锁定信息
 *
 * @author tmerclub
 * @date 2020-12-22 16:12:10
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ToString
public class SkuStockLock extends BaseModel implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    /**
     * id
     */
    private Long id;

    /**
     * 商品id
     */
    private Long spuId;
    /**
     * 商家商品id
     */
    private Long shopSpuId;

    /**
     * sku id
     */
    private Long skuId;

    /**
     * 订单id
     */
    private Long orderId;

    /**
     * 锁定库存数量
     */
    private Integer count;

    /**
     * 状态-1已解锁 0待确定 1已锁定
     */
    private Integer status;

    /**
     * 库存分片序号
     * 记录扣除分片的id，回调解锁的时候找到这个分片去扣锁定库存
     */
    private Integer zoneNo;

}
