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

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.math.BigDecimal;
import java.util.*;
import javax.validation.constraints.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;

@Schema(description = "管理后台 - 生产单表 order_{N}新增/修改 Request VO")
@Data
public class OrderSaveReqVO {

    @Schema(description = "生产单号，主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "15091")
    private Long id;

    @Schema(description = "父单号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "父单号不能为空，无父单时为0")
    private Long parentNo;

    @Schema(description = "交付日期", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "交付日期不能为空")
    private LocalDateTime deliveryDate;

    @Schema(description = "生产单类型，1主单 2子单", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "生产单类型，1主单 2子单不能为空")
    private Boolean type;

    @Schema(description = "生产单排序号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "生产单排序号不能为空")
    private Integer sort;

    @Schema(description = "CAD数据类型，1CAD 2WebCAD 3Excel", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "CAD数据类型，1CAD 2WebCAD 3Excel不能为空")
    private Boolean dataType;

    @Schema(description = "订单状态，0未排单1已排单2生产中3加工完成4打包完成5入库完成6出库完成", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "订单状态，0未排单1已排单2生产中3加工完成4打包完成5入库完成6出库完成不能为空")
    private Boolean status;

    @Schema(description = "自定义单号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "自定义单号不能为空")
    private String customOrderNo;

    @Schema(description = "客户", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "客户不能为空")
    private String customer;

    @Schema(description = "客户地址", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "客户地址不能为空")
    private String address;

    @Schema(description = "客户电话", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "客户电话不能为空")
    private String phoneNumber;

    @Schema(description = "经销商", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "经销商不能为空")
    private String dealer;

    @Schema(description = "经销商电话", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "经销商电话不能为空")
    private String dealerPhoneNumber;

    @Schema(description = "业务员", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "业务员不能为空")
    private String salesman;

    @Schema(description = "拆单员", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "拆单员不能为空")
    private String splitter;

    @Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜")
    @NotEmpty(message = "备注不能为空")
    private String remark;

}