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

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Transient;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
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;

@Data
@ToString
@EqualsAndHashCode
@ApiModel("管理后台 - 入仓货物详情创建 Request VO")
public class OrderWarehouseInCreateReqVO {

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

    @ApiModelProperty(value = "订单编号", required = true)
//    @NotNull(message = "订单编号不能为空")
    private String orderNo;

    @ApiModelProperty(value = "订单项id")
    private Long orderItemId;

    @ApiModelProperty(value = "订单项-商品ID", required = true)
    @NotNull(message = "订单项的商品ID不能为空")
    private Long prodId;

    @ApiModelProperty(value = "订单项-产品类型")
    private Integer prodType;

    @ApiModelProperty(value = "订单项-产品中文标题")
    private String prodTitleZh;

    @ApiModelProperty(value = "订单项-产品英文标题")
    private String prodTitleEn;

    @ApiModelProperty(value = "订单项-品牌", required = true)
    @NotNull(message = "品牌不能为空")
    private Long brand;

    // @ApiModelProperty(value = "订单项-0 无牌 1 有牌 2 中性", required = true)
    // @NotNull(message = "0 无牌 1 有牌 2 中性不能为空")
    // private Integer brandType;

    @ApiModelProperty(value = "费用模式：无牌价0，有牌价1，中性品牌价2")
    // @NotBlank(message = "费用模式不能为空")
    private Integer feeType;

    @ApiModelProperty(value = "订单项-商品特性(可选多个特性ID)")
    private String warehouseInProdAttrIds;

    @ApiModelProperty(value = "订单项-材质")
    private String material;

    @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;


    @ApiModelProperty(value = "入仓货物详情列表")
    @NotNull(message = "入仓货物详情不能为空")
    @Valid
    private List<OrderWarehouseInItemDto> orderWarehouseInItemDoList;


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


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

    /**
     * 是否拆单自动入仓
     */
    private Boolean isSplitOrderAutoCreate = false;


    @ApiModelProperty(value = "是否追加")
    private Boolean isAppend = false;

    //是否添加日志
    @Transient
    private Boolean isAddOrderOperateLog = true;

    /**
     * 是否处理影像。
     */
    @Transient
    private Boolean isProcessPicture = true;


}
