
package com.tmerclub.cloud.product.model;

import com.tmerclub.cloud.common.model.BaseModel;

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


/**
 * 库存锁定信息
 *
 * @author tmerclub
 * @date 2020-12-22 16:12:10
 */
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;

    public Long getShopSpuId() {
        return shopSpuId;
    }

    public void setShopSpuId(Long shopSpuId) {
        this.shopSpuId = shopSpuId;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getSpuId() {
        return spuId;
    }

    public void setSpuId(Long spuId) {
        this.spuId = spuId;
    }

    public Long getSkuId() {
        return skuId;
    }

    public void setSkuId(Long skuId) {
        this.skuId = skuId;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getZoneNo() {
        return zoneNo;
    }

    public void setZoneNo(Integer zoneNo) {
        this.zoneNo = zoneNo;
    }

    @Override
    public String toString() {
        return "SkuStockLock{" +
                "id=" + id +
                ", spuId=" + spuId +
                ", shopSpuId=" + shopSpuId +
                ", skuId=" + skuId +
                ", orderId=" + orderId +
                ", count=" + count +
                ", status=" + status +
                ", zoneNo=" + zoneNo +
                '}';
    }
}
