package com.maintain.business.domain.bo;

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.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.maintain.common.core.domain.BaseEntity;

/**
 * 物料退货业务对象 erp_material_returns
 *
 * @author liushuai
 * @date 2025-04-07
 */

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

    /**
     * 主键
     */
    private Long id;

    /**
     * 退货单号
     */
    private String returnsCode;

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

    /**
     * 退货时间
     */
    @NotNull(message = "退货时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date returnsTime;

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

    /**
     * 入库单号
     */
    private String putawayCode;

    /**
     * 订单单号
     */
    private String orderNumber;

    /**
     * 到货单号
     */
    private String arrivalNumber;

    /**
     * 入库类型（1采购入库 2铺货入库）
     */
    private String putawayType;

    /**
     * 入库时间
     */
    private Date putawayTime;

    /**
     * 入库金额
     */
    private BigDecimal putawayMoney;

    /**
     * 仓库ID
     */
    private Long warehouseId;

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

    /**
     * 供应商ID
     */
    private Long vendorId;

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

    /**
     * 创建部门（数据权限）
     */
    private Long createDeptId;

    /**
     * 退货明细列表
     */
    @NotEmpty(message = "退货明细列表不能为空", groups = { AddGroup.class, EditGroup.class })
    private List<ErpMaterialReturnsInfoBo> returnsInfoBoList;


}
