package cn.iocoder.yudao.module.order.vo.orderWarehouseIn;

import cn.iocoder.yudao.module.order.vo.order.ApplyInfoVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@ApiModel("管理后台 - 入仓货物详情更新 发起请求 Request VO")
@Data
@EqualsAndHashCode
@ToString(callSuper = true)
@Accessors(chain = true)
public class OrderWarehouseInUpdateApplyReqVO {

    @ApiModelProperty(value = "订单ID", required = true)
    @NotNull(message = "订单ID不能为空")
    private Long orderId;


    @ApiModelProperty(value = "订单项ID", required = true)
    @NotNull(message = "订单项id不能为空")
    private Long orderItemId;


    /**
     * 商品ID
     */
    @ApiModelProperty(value = "订单项-商品id")
    private Long prodId;
    /**
     * 产品类型
     */
    @ApiModelProperty(value = "订单项-产品类型")
    private Integer prodType;
    /**
     * 产品中文标题
     */
    @ApiModelProperty(value = "订单项-产品中文标题")
    private String prodTitleZh;
    /**
     * 产品英文标题
     */
    @ApiModelProperty(value = "订单项-产品英文标题")
    private String prodTitleEn;
    /**
     * 品牌
     */
    @ApiModelProperty(value = "订单项-品牌")
    private Long brand;
    /**
     * 0 无牌 1 有牌 2 中性
     */
    @ApiModelProperty(value = "订单项-0 无牌 1 有牌 2 中性")
    private Integer brandType;

    @ApiModelProperty(value = "收费：无牌价0，有牌价1，中性品牌价2")
    private Integer feeType;


    @ApiModelProperty(value = "订单项-填单数量填单数量")
    private Integer num;

    @ApiModelProperty(value = "订单项-填单体积")
    private BigDecimal volume;

    @ApiModelProperty(value = "订单项-填单重量")
    private BigDecimal weight;

    @ApiModelProperty(value = "入仓商品特性(可选多个特性ID)")
    private String warehouseInProdAttrIds;
    /**
     * 材质
     */
    @ApiModelProperty(value = "材质")
    private String material;

    /**
     * 入仓货物信息
     */
    @ApiModelProperty(value = "入仓货物属性集合", required = true)
    @NotNull(message = "入仓属性不能为空")
    @Valid
    private List<OrderWarehouseInItemDto> orderWarehouseInUpdateItemDoList;

    @ApiModelProperty(value = "入仓备注")
    @Length(max = 100, message = "备注最多支持100字")
    private String remark;

    @ApiModelProperty(value = "入仓影像列表")
    private List<String> pictureUrls;


    @ApiModelProperty("用途")
    private String usageIds;


    @ApiModelProperty(value = "抄送人userId")
    private String[] copyUserId;


    @ApiModelProperty(value = "修改的信息，返回给前端拼装使用")
    private List<ApplyInfoVO> applyInfoVOList;







    // ---------------- 下面属性是给出货阶段 追加入仓申请 使用的 ----------------

    @ApiModelProperty(value = "订单项-入仓时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private Date inTime;


    @ApiModelProperty(value = "入仓货物-0下单货物；1非下单货物")
    private Integer type = 0;

    /**
     * 入仓来源 字典order_warehouse_in_source 1-始发港入仓、2-调拨入仓、3-目的港入仓、4-退场入仓 5-拆单后入仓
     */
    @ApiModelProperty(value = "入仓来源 字典order_warehouse_in_source 1-始发港入仓、2-调拨入仓、3-目的港入仓、4-退场入仓 5-拆单后入仓")
    private Integer source = 1;

    // 出货阶段 追加，到仓
    private Boolean isShipmentAppend = false;
    // 出货阶段 修改
    private Boolean isShipmentUpdate = false;
}
