package com.haha.entity.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

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

/**
 * 补货单更新DTO
 */
@Data
public class ReplenishmentOrderUpdateDTO {

    @NotNull(message = "补货单ID不能为空")
    private Long id;

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

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

    /**
     * 预计到货时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private LocalDateTime expectedArrivalTime;

    /**
     * 备注
     */
    private String remark;

    /**
     * 更新商品列表（会替换原明细）
     */
    @Valid
    private List<ReplenishmentOrderCreateDTO.ReplenishmentOrderItemDTO> items;
}
