package com.czg.product.param;

import com.alibaba.fastjson2.annotation.JSONField;
import com.czg.product.dto.SaleOrderDTO;
import com.czg.validator.group.DefaultGroup;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;

/**
 * 出入库入参
 *
 * @author Tankaikai tankaikai@aliyun.com
 * @since 1.0 2025-02-20
 */
@Data
@Accessors(chain = true)
public class ConsInOutStockHeadParam implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 供应商id
     */
    private Long vendorId;
    /**
     * 出入库日期
     */
    @NotNull(message = "出入库日期不能为空", groups = DefaultGroup.class)
    @JSONField(format = "yyyy-MM-dd")
    private LocalDate inOutDate;
    /**
     * 应付金额
     */
    private BigDecimal amountPayable;
    /**
     * 实付金额
     */
    private BigDecimal actualPaymentAmount;
    /**
     * 付款日期
     */
    private LocalDate paymentDate;
    /**
     * 批次号
     */
    private String batchNo;
    /**
     * 备注
     */
    private String remark;
    /**
     * 耗材明细列表
     */
    List<ConsInOutStockBodyParam> bodyList;

    /**
     * 原始识别信息
     */
    private SaleOrderDTO ocrSaleOrder;
    /**
     * 未入库信息
     */
    private List<SaleOrderDTO.Item> unInCons;

    /**
     * 操作员
     */
    private String operator;
}
