
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 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
 */
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;

    public Integer getSupplierStatus() {
        return supplierStatus;
    }

    public void setSupplierStatus(Integer supplierStatus) {
        this.supplierStatus = supplierStatus;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getSpuCodes() {
        return spuCodes;
    }

    public void setSpuCodes(String spuCodes) {
        this.spuCodes = spuCodes;
    }

    public String getPartyCodes() {
        return partyCodes;
    }

    public void setPartyCodes(String partyCodes) {
        this.partyCodes = partyCodes;
    }

    public String getConsignee() {
        return consignee;
    }

    public void setConsignee(String consignee) {
        this.consignee = consignee;
    }

    public String getSpuName() {
        return spuName;
    }

    public void setSpuName(String spuName) {
        this.spuName = spuName;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    public Long getAddrId() {
        return addrId;
    }

    public void setAddrId(Long addrId) {
        this.addrId = addrId;
    }

    public Long getPurchaseOrderId() {
        return purchaseOrderId;
    }

    public void setPurchaseOrderId(Long purchaseOrderId) {
        this.purchaseOrderId = purchaseOrderId;
    }

    public Long getShopId() {
        return shopId;
    }

    public void setShopId(Long shopId) {
        this.shopId = shopId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Long getSupplierId() {
        return supplierId;
    }

    public void setSupplierId(Long supplierId) {
        this.supplierId = supplierId;
    }

    public Double getTotalAmount() {
        return totalAmount;
    }

    public void setTotalAmount(Double totalAmount) {
        this.totalAmount = totalAmount;
    }

    public Integer getTotalStock() {
        return totalStock;
    }

    public void setTotalStock(Integer totalStock) {
        this.totalStock = totalStock;
    }

    public Integer getActualTotalStock() {
        return actualTotalStock;
    }

    public void setActualTotalStock(Integer actualTotalStock) {
        this.actualTotalStock = actualTotalStock;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Long getEmployeeId() {
        return employeeId;
    }

    public void setEmployeeId(Long employeeId) {
        this.employeeId = employeeId;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public List<PurchaseOrderItemDTO> getPurchaseOrderItemList() {
        return purchaseOrderItemList;
    }

    public void setPurchaseOrderItemList(List<PurchaseOrderItemDTO> purchaseOrderItemList) {
        this.purchaseOrderItemList = purchaseOrderItemList;
    }

    public String getSupplierName() {
        return supplierName;
    }

    public void setSupplierName(String supplierName) {
        this.supplierName = supplierName;
    }

    public String getVoucherImgUrls() {
        return voucherImgUrls;
    }

    public void setVoucherImgUrls(String voucherImgUrls) {
        this.voucherImgUrls = voucherImgUrls;
    }

    public Integer getSysType() {
        return sysType;
    }

    public void setSysType(Integer sysType) {
        this.sysType = sysType;
    }

    public Long getWarehouseId() {
        return warehouseId;
    }

    public void setWarehouseId(Long warehouseId) {
        this.warehouseId = warehouseId;
    }

    public Long getSupplierWarehouseId() {
        return supplierWarehouseId;
    }

    public void setSupplierWarehouseId(Long supplierWarehouseId) {
        this.supplierWarehouseId = supplierWarehouseId;
    }

    public Integer getStockPointType() {
        return stockPointType;
    }

    public void setStockPointType(Integer stockPointType) {
        this.stockPointType = stockPointType;
    }

    public List<Integer> getNotInStatuses() {
        return notInStatuses;
    }

    public void setNotInStatuses(List<Integer> notInStatuses) {
        this.notInStatuses = notInStatuses;
    }

    @Override
    public String toString() {
        return "PurchaseOrderDTO{" +
                "purchaseOrderId=" + purchaseOrderId +
                ", shopId=" + shopId +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", supplierId=" + supplierId +
                ", totalAmount=" + totalAmount +
                ", totalStock=" + totalStock +
                ", actualTotalStock=" + actualTotalStock +
                ", status=" + status +
                ", supplierStatus=" + supplierStatus +
                ", employeeId=" + employeeId +
                ", remark='" + remark + '\'' +
                ", purchaseOrderItemList=" + purchaseOrderItemList +
                ", supplierName='" + supplierName + '\'' +
                ", shopName='" + shopName + '\'' +
                ", spuName='" + spuName + '\'' +
                ", consignee='" + consignee + '\'' +
                ", mobile='" + mobile + '\'' +
                ", addrId=" + addrId +
                ", startTime=" + startTime +
                ", endTime=" + endTime +
                ", spuCodes='" + spuCodes + '\'' +
                ", partyCodes='" + partyCodes + '\'' +
                ", voucherImgUrls='" + voucherImgUrls + '\'' +
                ", warehouseId=" + warehouseId +
                ", supplierWarehouseId=" + supplierWarehouseId +
                ", sysType=" + sysType +
                ", stockPointType=" + stockPointType +
                ", notInStatuses=" + notInStatuses +
                '}';
    }
}
