
package com.tmerclub.cloud.order.bo.mongo;

import com.tmerclub.cloud.order.model.PurchaseOrderLang;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.CompoundIndex;
import org.springframework.data.mongodb.core.index.CompoundIndexes;
import org.springframework.data.mongodb.core.mapping.Document;

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

/**
 * 采购订单信息
 *
 * @author YXF
 * @date 20222-09-20
 */
@CompoundIndexes({
        @CompoundIndex(name = "shop_idx", def = "{'shopId':1}"),
        @CompoundIndex(name = "supplier_idx", def = "{'supplierId':1}")
})
@Document("purchase_order")
@Data
@ToString
public class MongoPurchaseOrderBO implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    /**
     * 采购id
     */
    @Id
    private Long purchaseOrderId;

    /**
     * 店铺id
     */
    private Long shopId;

    /**
     * 店铺名称
     */
    private String shopName;

    /**
     * 订单创建时间
     */
    private Date createTime;

    /**
     * 订单更新时间
     */
    private Date updateTime;

    /**
     * 送达时间
     */
    private Date deliverTime;

    /**
     * 发货时间
     */
    private Date deliveryTime;

    /**
     * 供应商id
     */
    private Long supplierId;

    /**
     * 供应商名称
     */
    private String supplierName;

    /**
     * 总采购金额
     */
    private Double totalAmount;

    /**
     * 总采购库存数量
     */
    private Integer totalStock;

    /**
     * 实际总库存数量
     */
    private Integer actualTotalStock;

    /**
     * 采购订单地址id
     */
    private Long purchaseOrderAddrId;

    /**
     * 状态 0:已作废 1:待入库 2:已发货 3.部分入库 5:已完成
     */
    private Integer status;

    /**
     * 备注
     */
    private String remark;

    /**
     * 操作员工id
     */
    private Long employeeId;

    /**
     * 配送类型 1:快递 2:自提 3：无需快递 4同城配送
     */
    private Integer deliveryType;

    /**
     * 收货人姓名
     */
    private String consignee;

    /**
     * 收货人手机号
     */
    private String mobile;

    /**
     * 商品中文名称
     */
    private String spuNameZh;

    /**
     * 商品英文名称
     */
    private String spuNameEn;

    /**
     * 付款凭证图片 多个图片逗号分隔
     */
    private String voucherImgUrls;

    /**
     * 仓库id
     */
    private Long warehouseId;

    /**
     * 库存点类型
     */
    private Integer stockPointType;

    /**
     * 供应商仓库id
     */
    private Long supplierWarehouseId;

    @Schema(description = "采购订单项列表")
    private List<MongoPurchaseOrderItemBO> purchaseOrderItems;

    @Schema(description = "采购订单项列表")
    private List<PurchaseOrderLang> purchaseOrderLangs;

    public Long getPurchaseOrderAddrId() {
        return purchaseOrderAddrId;
    }

    public void setPurchaseOrderAddrId(Long purchaseOrderAddrId) {
        this.purchaseOrderAddrId = purchaseOrderAddrId;
    }

    public Date getDeliveryTime() {
        return deliveryTime;
    }

    public void setDeliveryTime(Date deliveryTime) {
        this.deliveryTime = deliveryTime;
    }

    public Integer getDeliveryType() {
        return deliveryType;
    }

    public void setDeliveryType(Integer deliveryType) {
        this.deliveryType = deliveryType;
    }

    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 getDeliverTime() {
        return deliverTime;
    }

    public void setDeliverTime(Date deliverTime) {
        this.deliverTime = deliverTime;
    }

    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 String getRemark() {
        return remark;
    }

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

    public Long getEmployeeId() {
        return employeeId;
    }

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

    public String getConsignee() {
        return consignee;
    }

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

    public String getMobile() {
        return mobile;
    }

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

    public List<MongoPurchaseOrderItemBO> getPurchaseOrderItems() {
        return purchaseOrderItems;
    }

    public void setPurchaseOrderItems(List<MongoPurchaseOrderItemBO> purchaseOrderItems) {
        this.purchaseOrderItems = purchaseOrderItems;
    }

    public List<PurchaseOrderLang> getPurchaseOrderLangs() {
        return purchaseOrderLangs;
    }

    public void setPurchaseOrderLangs(List<PurchaseOrderLang> purchaseOrderLangs) {
        this.purchaseOrderLangs = purchaseOrderLangs;
    }

    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 String getSpuNameZh() {
        return spuNameZh;
    }

    public void setSpuNameZh(String spuNameZh) {
        this.spuNameZh = spuNameZh;
    }

    public String getSpuNameEn() {
        return spuNameEn;
    }

    public void setSpuNameEn(String spuNameEn) {
        this.spuNameEn = spuNameEn;
    }

    public String getVoucherImgUrls() {
        return voucherImgUrls;
    }

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

    public String getShopName() {
        return shopName;
    }

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

    public String getSupplierName() {
        return supplierName;
    }

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

    public Long getWarehouseId() {
        return warehouseId;
    }

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

    public Integer getStockPointType() {
        return stockPointType;
    }

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

    public Long getSupplierWarehouseId() {
        return supplierWarehouseId;
    }

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

    @Override
    public String toString() {
        return "MongoPurchaseOrderBO{" +
                "purchaseOrderId=" + purchaseOrderId +
                ", shopId=" + shopId +
                ", shopName='" + shopName + '\'' +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", deliverTime=" + deliverTime +
                ", deliveryTime=" + deliveryTime +
                ", supplierId=" + supplierId +
                ", supplierName='" + supplierName + '\'' +
                ", totalAmount=" + totalAmount +
                ", totalStock=" + totalStock +
                ", actualTotalStock=" + actualTotalStock +
                ", purchaseOrderAddrId=" + purchaseOrderAddrId +
                ", status=" + status +
                ", remark='" + remark + '\'' +
                ", employeeId=" + employeeId +
                ", deliveryType=" + deliveryType +
                ", consignee='" + consignee + '\'' +
                ", mobile='" + mobile + '\'' +
                ", spuNameZh='" + spuNameZh + '\'' +
                ", spuNameEn='" + spuNameEn + '\'' +
                ", voucherImgUrls='" + voucherImgUrls + '\'' +
                ", warehouseId=" + warehouseId +
                ", stockPointType=" + stockPointType +
                ", supplierWarehouseId=" + supplierWarehouseId +
                ", purchaseOrderItems=" + purchaseOrderItems +
                ", purchaseOrderLangs=" + purchaseOrderLangs +
                '}';
    }
}
