
package com.tmerclub.cloud.order.dto;

import io.swagger.v3.oas.annotations.Hidden;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 采购订单DTO
 *
 * @author lhd
 * @date 2022-06-22 17:12:02
 */
@Data
@ToString
public class PurchaseOrderDTO implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    @Schema(description = "采购id")
    private Long purchaseOrderId;

    @Schema(description = "店铺id")
    private Long shopId;

    @Schema(description = "创建时间")
    private Date createTime;

    @Schema(description = "更新时间")
    private Date updateTime;

    @Schema(description = "供应商id")
    private Long supplierId;

    @Schema(description = "总采购金额")
    private Double totalAmount;

    @Schema(description = "总采购库存数量")
    private Integer totalStock;

    @Schema(description = "实际总库存数量")
    private Integer actualTotalStock;

    @Schema(description = "状态 0:已作废 1:待入库 2:已发货 3.部分入库 4.待付款 5:已完成")
    private Integer status;

    @Schema(description = "状态 0:已作废 1:待入库 2:已发货 3.部分入库 5:已完成")
    private Integer supplierStatus;

    @Schema(description = "操作员工id")
    private Long employeeId;

    @Schema(description = "备注")
    private String remark;

    @Schema(description = "采购商品列表")
    @NotEmpty(message = "采购商品列表不能为空")
    private List<PurchaseOrderItemDTO> purchaseOrderItemList;

    @Schema(description = "供应商名称")
    private String supplierName;

    @Schema(description = "商家名称")
    private String shopName;

    @Schema(description = "商品名称")
    private String spuName;

    @Schema(description = "收货人")
    private String consignee;

    @Schema(description = "手机号")
    private String mobile;

    @Schema(description = "地址ID，0为默认地址")
    @NotNull(message = "地址不能为空")
    private Long addrId;

    /**
     * 开始时间
     */
    @Schema(description = "开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;
    /**
     * 结束时间
     */
    @Schema(description = "结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    @Schema(description = "商品编码")
    private String spuCodes;

    @Schema(description = "sku编码")
    private String partyCodes;

    @Schema(description = "付款凭证图片")
    private String voucherImgUrls;

    @Schema(description = "仓库id")
    private Long warehouseId;

    @Schema(description = "供应商仓库id")
    private Long supplierWarehouseId;

    @Hidden
    @Schema(description = "系统类型")
    private Integer sysType;

    @Hidden
    @Schema(description = "库存点类型(1:仓库, 2:门店)")
    private Integer stockPointType;

    @Hidden
    @Schema(description = "不包含的状态集合")
    private List<Integer> notInStatuses;

}
