package com.maintain.business.domain.bo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.maintain.common.convert.ExcelDictConvert;
import com.maintain.common.core.validate.AddGroup;
import com.maintain.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.*;

import java.util.Date;

import java.math.BigDecimal;
import java.util.List;

import com.maintain.common.core.domain.BaseEntity;

/**
 * 物料库存记录业务对象 erp_material_inventory_record
 *
 * @author liushuai
 * @date 2025-07-16
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class ErpMaterialInventoryRecordBo extends BaseEntity {

    /**
     * 主键
     */
    @NotNull(message = "主键不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 明细ID（入库|退货|出库|退料）
     */
    @NotNull(message = "明细ID（入库|退货|出库|退料）不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long infoId;

    /**
     * 物料ID
     */
    @NotNull(message = "物料ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long materialId;

    /**
     * 供应商名称
     */
    private String vendorName;

    /**
     * 物资编码
     */
    @NotBlank(message = "物资编码不能为空", groups = { AddGroup.class, EditGroup.class })
    private String materialCode;

    /**
     * 物资名称
     */
    @NotBlank(message = "物资名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String materialName;

    /**
     * 物资规格
     */
    @NotBlank(message = "物资规格不能为空", groups = { AddGroup.class, EditGroup.class })
    private String materialSpecifications;

    /**
     * 部门ID
     */
    @NotNull(message = "部门ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long deptId;

    /**
     * 仓库ID
     */
    @NotNull(message = "仓库ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long warehouseId;

    /**
     * 仓库ID列表
     */
    private List<Long> warehouseIdList;

    /**
     * 仓库名称
     */
    private String warehouseName;

    /**
     * 供应商ID
     */
    @NotNull(message = "供应商ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long vendorId;

    /**
     * 数量
     */
    @NotNull(message = "数量不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal number;

    /**
     * 单价
     */
    @NotNull(message = "单价不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal price;

    /**
     * 金额
     */
    @NotNull(message = "金额不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal money;

    /**
     * 类型（1入库2退货3出库4退料）
     */
    @NotBlank(message = "类型（1入库2退货3出库4退料）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String type;

    /**
     * 创建部门(数据权限)
     */
    private Long createDeptId;

    /**
     * 库存数量
     */
    private BigDecimal inventory;


}
