
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-11-11 13:49:06
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ToString
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;
    }

}
