
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-11-11 13:49:06
 */
public class SkuStock extends BaseModel implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    /**
     * 商品id
     */
    private Long spuId;

    /**
     * SKU ID
     */
    private Long skuId;

    /**
     * 可售卖库存
     */
    private Integer stock;

    /**
     * 锁定库存
     */
    private Integer lockStock;

    public SkuStock() {
    }

    public SkuStock(Long skuId, Integer stock, Integer lockStock) {
        this.skuId = skuId;
        this.stock = stock;
        this.lockStock = lockStock;
    }

    public Long getSkuId() {
        return skuId;
    }

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

    public Integer getLockStock() {
        return lockStock;
    }

    public void setLockStock(Integer lockStock) {
        this.lockStock = lockStock;
    }

    public Integer getStock() {
        return stock;
    }

    public void setStock(Integer stock) {
        this.stock = stock;
    }

    public Long getSpuId() {
        return spuId;
    }

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

    @Override
    public String toString() {
        return "SkuStock{" +
                "spuId=" + spuId +
                ", skuId=" + skuId +
                ", lockStock=" + lockStock +
                ", stock=" + stock +
                '}';
    }
}
