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

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

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

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

/**
 * @author there
 * 排单页面生产单VO
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class OrderRespVOCopy {
    @Schema(description = "生产单id")
    private Long orderId;
    @Schema(description = "生产单状态")
    private Integer status;
    @Schema(description = "自定义单号")
    private String defineId;
    @Schema(description = "客户")
    private String customer;
    @Schema(description = "地址")
    private String address;
    @Schema(description = "订单日期")
    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY, timezone = TIME_ZONE_DEFAULT)
    private LocalDateTime orderDate;
    @Schema(description = "交付日期")
    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND, timezone = TIME_ZONE_DEFAULT)
    private LocalDateTime deliveryDate;
    @Schema(description = "更新时间")
    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND, timezone = TIME_ZONE_DEFAULT)
    private Date updateTime;
    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND, timezone = TIME_ZONE_DEFAULT)
    private Date createTime;
    @Schema(description = "片数")
    private int num;
    @Schema(description = "平方")
    private BigDecimal area = new BigDecimal("0");
    @Schema(description = "商品id")
    private String goodsId;

    @Schema(description = "订单对应的板件的信息")
    private List<PlatePage> platePages;

}