package com.lframework.xingyun.sc.vo.sale;

import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.lframework.starter.common.constants.StringPool;
import com.lframework.starter.web.components.validation.IsEnum;
import com.lframework.starter.web.vo.SortPageVo;
import com.lframework.xingyun.sc.enums.SaleOrderIsLease;
import com.lframework.xingyun.sc.enums.SaleOrderPurchaseStatus;
import com.lframework.xingyun.sc.enums.SaleOrderStatus;
import io.swagger.annotations.ApiModelProperty;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

import lombok.Data;

@Data
public class QuerySaleOrderVo extends SortPageVo {

  private static final long serialVersionUID = 1L;

  /**
   * 单号
   */
  @ApiModelProperty("单号")
  private String code;

  /**
   * 客户ID
   */
  @ApiModelProperty("客户ID")
  private String customerId;

  /**
   * 仓库ID
   */
  @ApiModelProperty("仓库ID")
  private String scId;

  /**
   * 操作人ID
   */
  @ApiModelProperty("操作人ID")
  private String createBy;

  /**
   * 操作起始时间
   */
  @ApiModelProperty("操作起始时间")
  private LocalDateTime createStartTime;

  /**
   * 操作截止时间
   */
  @ApiModelProperty("操作截止时间")
  private LocalDateTime createEndTime;

  /**
   * 审核人ID
   */
  @ApiModelProperty("审核人ID")
  private String approveBy;

  /**
   * 审核起始时间
   */
  @ApiModelProperty("审核起始时间")
  private LocalDateTime approveStartTime;

  /**
   * 审核截止时间
   */
  @ApiModelProperty("审核截止时间")
  private LocalDateTime approveEndTime;

  /**
   * 状态
   */
  @ApiModelProperty("状态")
  @IsEnum(message = "状态格式不正确！", enumClass = SaleOrderStatus.class)
  private Integer status;

  /**
   * 销售员ID
   */
  @ApiModelProperty("销售员ID")
  private String salerId;


  @ApiModelProperty("是否租赁订单")
  //@IsEnum(message = "格式不正确！", enumClass = SaleOrderIsLease.class)
  private Integer isLease;


  /**
   * 采购状态，0未采购、2完成采购、3部分采购
   */
  //@IsEnum(message = "格式不正确！", enumClass = SaleOrderPurchaseStatus.class)
  private Integer purchaseStatus;

  @ApiModelProperty(value = "租赁开始日期")
  @DateTimeFormat(StringPool.DATE_PATTERN)
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private LocalDateTime leaseStartTime;


  @ApiModelProperty(value = "租赁结束日期")
  @DateTimeFormat(StringPool.DATE_PATTERN)
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private LocalDateTime leaseEndTime;

}
