package com.wansenai.entities.stock;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>库存账表</p>
 * @author clunt
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("bas_stock_account")
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "库存账表")
public class BasStockAccount implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "主键ID")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;

    @Schema(description = "仓库ID")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long warehouseId;

    @Schema(description = "库区ID")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long warehouseTypeId;

    @Schema(description = "库存类型")
    private String stockType;

    @Schema(description = "商品ID")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long goodsId;

    @Schema(description = "物料ID")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long skuId;

    @Schema(description = "锁定数")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private BigDecimal qtyLock;

    @Schema(description = "在途数")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private BigDecimal qtyTran;

    @Schema(description = "在库数")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private BigDecimal qty;

    @Schema(description = "发货在途数")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private BigDecimal qtyTranOut;

    @Schema(description = "收货在途数")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private BigDecimal qtyTranIn;

    @Schema(description = "创建时间")
    private Date createTime;

    @Schema(description = "创建人")
    private String createBy;

    @Schema(description = "更新时间")
    private Date updateTime;

    @Schema(description = "更新人")
    private String updateBy;

    @Schema(description = "备注")
    private String remark;

}
