package net.lab1024.sa.admin.module.business.wms.inventory.inventory.domain.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 库存信息 实体类
 *
 * @Author 霍锦
 * @Date 2024-12-06 17:24:53
 * @Copyright 友仓
 */

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("t_inventory")
public class InventoryEntity implements Serializable {

    /**
     * 库存id
     */
    @TableId(type = IdType.AUTO)
    private Long inventoryId;

    /**
     * 物料属性
     */
    private Long itemKeyId;

    /**
     * 库位
     */
    private Long locationId;

    /**
     * 容器
     */
    private Long stockId;

    /**
     * 数量
     */
    private BigDecimal quantity;

    /**
     * 占用数
     */
    private BigDecimal queuedQuantity;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 创建人ID
     */
    private Long createUserId;

    /**
     * 创建人
     */
    private String createUserName;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

}
