package com.cf.imes.module.executor.controller.admin.plan.vo;

import com.cf.imes.framework.common.pojo.PageParam;
import com.cf.imes.framework.common.validation.NumberValid;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;

import jakarta.validation.constraints.Pattern;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;

import static com.cf.imes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;

/**
 * @author there
 */

@Data
public class OrderPageReqVOCopy extends PageParam {

    @Schema(description = "订单id")
    @Pattern(regexp = "^[0-9]*$",message = "订单号必须为数字")
    @Length(max = 19,message = "订单号长度不能超过19位")
    private String orderId;

    @Schema(description = "自定义id")
    @Length(max = 32,message = "自定义单号数据过长，请重新输入")
    private String defaultId;

    @Schema(description = "订单类型")
    private Integer orderType;

    @Schema(description = "客户")
    @Length(max = 255, message = "客户数据过长，请重新输入")
    private String consignee;

    @Schema(description = "地址")
    @Length(max = 255, message = "收货地址数据过长，请重新输入")
    private String consigneeAddress;

    @Schema(description = "状态列表")
    private List<Integer> stateList;

    @Schema(description = "矩形")
    private Boolean rectangle;

    @Schema(description = "异形")
    private Boolean specialShaped;

    @Schema(description = "造型")
    private Boolean sculpt;

    @Schema(description = "有挖穿造型")
    private Boolean holeThrough;

    @Schema(description = "有挖穿孔")
    private Boolean burrow;

    @Schema(description = "有二维纹路")
    private Boolean twoDimensionalToolPath;

    @Schema(description = "门板")
    private Boolean isDoor;

    @Schema(description = "订单订单日期", example = "[2022-07-01 ,2022-07-01]")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    private LocalDate[] createTime;

    @Schema(description = "长 小范围")
    @NumberValid(name = "长度")
    private BigDecimal longMinRang;

    @Schema(description = "长 大范围")
    @NumberValid(name = "长度")
    private BigDecimal longMaxRang;

    @Schema(description = "宽 小范围")
    @NumberValid(name = "宽度")
    private BigDecimal widthMinRang;

    @Schema(description = "宽 大范围")
    @NumberValid(name = "宽度")
    private BigDecimal widthMaxRang;


    @Schema(description = "商品ID-板材库对应的大板ID-由板材查询订单时传")
//    @Size(max = 20,message = "最多可同时查询20个板材")
    private List<String> goodsIds;

    @Schema(description = "排单ID-修改排单时为必传条件")
    private Long planId;

    @Schema(description = "房间ID")
    private List<Long> roomId;

    @Schema(description = "柜体ID")
    private List<Long> bodyId;

    @Schema(description = "订单ids")
//    @Size(max = 20,message = "最多可同时查询20个订单")
    private List<Long> orderIds;

    @Schema(description = "板材名称")
    private String goodsName;

    @Schema(description = "材质")
    private String material;

    @Schema(description = "颜色")
    private String color;

    @Schema(description = "厚度")
    private BigDecimal thickness;
}
