package com.zm.order.tool.server.request;

import com.alibaba.fastjson.JSON;
import io.swagger.annotations.ApiModelProperty;

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

/**
 * @Description 创建订单请求
 * @Author: ph
 * @Date: 2019/10/24 13:47
 */
public class CreateOrderRequest implements Serializable {

    private static final long serialVersionUID = -5853103532017083601L;

    @ApiModelProperty(value = "订单号", example = "D5AD635E14A4E17796", required = true)
    private String orderNo;

    @ApiModelProperty(value = "用户id", example = "10202", required = true)
    private Long userId;

    @ApiModelProperty(value = "店内单号 餐饮:取单号", example = "T001")
    private String storeOrderNo;

    @ApiModelProperty(value = "订单类型 默认0", example = "1", required = true)
    private Integer orderType;

    @ApiModelProperty(value = "订单子类型 默认0", example = "1")
    private Integer orderSubType;

    @ApiModelProperty(value = "联系方式", example = "15111234566")
    private String mobile;

    @ApiModelProperty(value = "地址id", example = "1")
    private Integer addrId;

    @ApiModelProperty(value = "商家id", example = "10556", required = true)
    private Long sellerId;

    @ApiModelProperty(value = "门店id", example = "102", required = true)
    private Long storeId;

    @ApiModelProperty(value = "订单来源", example = "1", required = true)
    private Integer source;

    @ApiModelProperty(value = "来源单号 第三方单据为第三方订单号 否则为平台订单号", example = "D1ADD51AD472C67796",required = true)
    private String sourceNo;

    @ApiModelProperty(value = "来源系统")
    private Integer fromSystem;

    @ApiModelProperty(value = "来源信息", example = "{\"source_info\":1}")
    private Map<String, Object> sourceInfoMap;

    @ApiModelProperty(value = "订单总金额 单位分", example = "10000",required = true)
    private Integer totalAmount;

    @ApiModelProperty(value = "商品金额 单位分", example = "9000", required = true)
    private Integer itemAmount;

    @ApiModelProperty(value = "成本金额 单位分", example = "6000")
    private Integer costAmount;

    @ApiModelProperty(value = "包装金额 单位分", example = "500", required = true)
    private Integer packAmount;

    @ApiModelProperty(value = "运费金额 单位分", example = "600", required = true)
    private Integer freightAmount;

    @ApiModelProperty(value = "优惠金额 单位分", example = "100", required = true)
    private Integer discountAmount;

    @ApiModelProperty(value = "订单级别优惠列表")
    private List<AddOrderDiscountRequest> orderDiscountList;

    @ApiModelProperty(value = "订单级别优惠列表")
    private List<AddOrderDiscountRequest> discountList;

    @ApiModelProperty(value = "订单商品列表")
    private List<AddOrderItemRequest> itemList;

    @ApiModelProperty(value = "实付金额 单位分", example = "10000",required = true)
    private Integer actualAmount;

    @ApiModelProperty(value = "发票类型 默认0", example = "1")
    private Integer invoiceType;

    @ApiModelProperty(value = "支付金额 单位分", example = "10000")
    private Integer payAmount;

    @ApiModelProperty(value = "找零金额 单位分", example = "100")
    private Integer changeAmount;

    @ApiModelProperty(value = "活动信息", example = "{}")
    private Map<String, Object> activityInfoMap;

    @ApiModelProperty(value = "支付模式 默认0", example = "0", required = true)
    private Integer payModel;

    @ApiModelProperty(value = "状态 默认0", example = "0", required = true)
    private Integer status;

    @ApiModelProperty(value = "支付信息", example = "{}")
    private Map<String, Object> payInfoMap;

    @ApiModelProperty(value = "商家备注", example = "加急")
    private String sellerRemarks;

    @ApiModelProperty(value = "买家备注", example = "快")
    private String buyerRemarks;

    @ApiModelProperty(value = "是否立刻履约 默认0", example = "1", required = true)
    private Integer isImmediatePerformance;

    @ApiModelProperty(value = "履约类型", example = "1")
    private Integer performanceType;

    @ApiModelProperty(value = "履约平台 餐饮堂食：桌号 餐饮外卖：配送平台", example = "1")
    private String performancePlatform;

    @ApiModelProperty(value = "履约状态", example = "1")
    private Integer performanceStatus;

    @ApiModelProperty(value = "下单时间 默认当前时间 毫秒", example = "15798987889000", required = true)
    private Date orderAt;

    @ApiModelProperty(value = "支付时间 毫秒", example = "15798987889000")
    private Date payAt;

    @ApiModelProperty(value = "支付状态", example = "1")
    private Integer payStatus;

    @ApiModelProperty(value = "是否打印", example = "1")
    private Integer isReceipt;

    @ApiModelProperty(value = "打印终端", example = "1")
    private String receiptTerminal;

    @ApiModelProperty(value = "付款人", example = "12032")
    private Long payer;

    @ApiModelProperty(value = "支付方式", example = "1")
    private Integer payType;

    @ApiModelProperty(value = "第三方支付单号", example = "SDU023432412312")
    private String thirdPayNo;

    @ApiModelProperty(value = "订单完成时间 毫秒", example = "15798987889000")
    private Date completedAt;

    @ApiModelProperty(value = "是否独立收款", example = "1")
    private Integer isAlone;

    @ApiModelProperty(value = "履约信息", example = "{}")
    private Map<String, Object> performanceInfoMap;

    @ApiModelProperty(value = "扩展信息", example = "{}")
    private Map<String, Object> extraMap;

    @ApiModelProperty(value = "三方单扩展信息", example = "{}")
    private Map<String, Object> thirdExtraMap;

    @ApiModelProperty(value = "支付单号", example = "9527")
    private String payNo;

    @ApiModelProperty(value = "临时兼容企小店数据迁移，接单状态", example = "111")
    private Integer receiveStatus;

    @ApiModelProperty(value = "临时兼容企小店数据迁移，接单时间", example = "15798987889000")
    private Date receiveAt;

    @ApiModelProperty(value = "临时兼容企小店数据迁移，售后状态", example = "15798987889000")
    private Integer afterSaleStatus;

    @ApiModelProperty(value = "履约信息，保存至履约表中，订单表中不做存储", example = "{}")
    private Map<String,Object> tempPerformanceInfo;

    @ApiModelProperty(value = "收货地址信息")
    private AddOrderAddrRequest addr;

    @ApiModelProperty(value = "业务子类型", example = "0")
    private Integer bizSubType;

    @ApiModelProperty(value = "业务类型", example = "0")
    private Integer bizType;

    @ApiModelProperty(value = "创建时间")
    private Date createdAt;

    @ApiModelProperty(value = "修改时间")
    private Date updatedAt;

    @ApiModelProperty(value = "支付明细列表")
    private List<CreateOrderPayDetailsRequest> payDetailsList;

    public List<CreateOrderPayDetailsRequest> getPayDetailsList() {
        return payDetailsList;
    }

    public void setPayDetailsList(List<CreateOrderPayDetailsRequest> payDetailsList) {
        this.payDetailsList = payDetailsList;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    public Date getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(Date updatedAt) {
        this.updatedAt = updatedAt;
    }

    public Integer getBizType() {
        return bizType;
    }

    public void setBizType(Integer bizType) {
        this.bizType = bizType;
    }

    public Integer getBizSubType() {
        return bizSubType;
    }

    public void setBizSubType(Integer bizSubType) {
        this.bizSubType = bizSubType;
    }

    public Map<String, Object> getTempPerformanceInfo() {
        return tempPerformanceInfo;
    }

    public void setTempPerformanceInfo(Map<String, Object> tempPerformanceInfo) {
        this.tempPerformanceInfo = tempPerformanceInfo;
    }

    public Integer getReceiveStatus() {
        return receiveStatus;
    }

    public void setReceiveStatus(Integer receiveStatus) {
        this.receiveStatus = receiveStatus;
    }

    public Date getReceiveAt() {
        return receiveAt;
    }

    public void setReceiveAt(Date receiveAt) {
        this.receiveAt = receiveAt;
    }

    public Integer getAfterSaleStatus() {
        return afterSaleStatus;
    }

    public void setAfterSaleStatus(Integer afterSaleStatus) {
        this.afterSaleStatus = afterSaleStatus;
    }

    public String getPayNo() {
        return payNo;
    }

    public void setPayNo(String payNo) {
        this.payNo = payNo;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getStoreOrderNo() {
        return storeOrderNo;
    }

    public void setStoreOrderNo(String storeOrderNo) {
        this.storeOrderNo = storeOrderNo;
    }

    public Integer getOrderType() {
        return orderType;
    }

    public void setOrderType(Integer orderType) {
        this.orderType = orderType;
    }

    public Integer getOrderSubType() {
        return orderSubType;
    }

    public void setOrderSubType(Integer orderSubType) {
        this.orderSubType = orderSubType;
    }

    public String getMobile() {
        return mobile;
    }

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

    public Integer getAddrId() {
        return addrId;
    }

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

    public Long getSellerId() {
        return sellerId;
    }

    public void setSellerId(Long sellerId) {
        this.sellerId = sellerId;
    }

    public Long getStoreId() {
        return storeId;
    }

    public void setStoreId(Long storeId) {
        this.storeId = storeId;
    }

    public Integer getSource() {
        return source;
    }

    public void setSource(Integer source) {
        this.source = source;
    }

    public String getSourceNo() {
        return sourceNo;
    }

    public void setSourceNo(String sourceNo) {
        this.sourceNo = sourceNo;
    }

    public Map<String, Object> getSourceInfoMap() {
        return sourceInfoMap;
    }

    public Integer getFromSystem() {
        return fromSystem;
    }

    public void setFromSystem(Integer fromSystem) {
        this.fromSystem = fromSystem;
    }

    public void setSourceInfoMap(Map<String, Object> sourceInfoMap) {
        this.sourceInfoMap = sourceInfoMap;
    }

    public Integer getTotalAmount() {
        return totalAmount;
    }

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

    public Integer getItemAmount() {
        return itemAmount;
    }

    public void setItemAmount(Integer itemAmount) {
        this.itemAmount = itemAmount;
    }

    public Integer getCostAmount() {
        return costAmount;
    }

    public void setCostAmount(Integer costAmount) {
        this.costAmount = costAmount;
    }

    public Integer getPackAmount() {
        return packAmount;
    }

    public void setPackAmount(Integer packAmount) {
        this.packAmount = packAmount;
    }

    public Integer getFreightAmount() {
        return freightAmount;
    }

    public void setFreightAmount(Integer freightAmount) {
        this.freightAmount = freightAmount;
    }

    public Integer getDiscountAmount() {
        return discountAmount;
    }

    public void setDiscountAmount(Integer discountAmount) {
        this.discountAmount = discountAmount;
    }

    public List<AddOrderDiscountRequest> getOrderDiscountList() {
        return orderDiscountList;
    }

    public void setOrderDiscountList(List<AddOrderDiscountRequest> orderDiscountList) {
        this.orderDiscountList = orderDiscountList;
    }

    public List<AddOrderDiscountRequest> getDiscountList() {
        return discountList;
    }

    public void setDiscountList(List<AddOrderDiscountRequest> discountList) {
        this.discountList = discountList;
    }

    public List<AddOrderItemRequest> getItemList() {
        return itemList;
    }

    public void setItemList(List<AddOrderItemRequest> itemList) {
        this.itemList = itemList;
    }

    public Integer getActualAmount() {
        return actualAmount;
    }

    public void setActualAmount(Integer actualAmount) {
        this.actualAmount = actualAmount;
    }

    public Integer getInvoiceType() {
        return invoiceType;
    }

    public void setInvoiceType(Integer invoiceType) {
        this.invoiceType = invoiceType;
    }

    public Integer getPayAmount() {
        return payAmount;
    }

    public void setPayAmount(Integer payAmount) {
        this.payAmount = payAmount;
    }

    public Integer getChangeAmount() {
        return changeAmount;
    }

    public void setChangeAmount(Integer changeAmount) {
        this.changeAmount = changeAmount;
    }

    public Map<String, Object> getActivityInfoMap() {
        return activityInfoMap;
    }

    public void setActivityInfoMap(Map<String, Object> activityInfoMap) {
        this.activityInfoMap = activityInfoMap;
    }

    public Integer getPayModel() {
        return payModel;
    }

    public void setPayModel(Integer payModel) {
        this.payModel = payModel;
    }

    public Integer getStatus() {
        return status;
    }

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

    public Map<String, Object> getPayInfoMap() {
        return payInfoMap;
    }

    public void setPayInfoMap(Map<String, Object> payInfoMap) {
        this.payInfoMap = payInfoMap;
    }

    public String getSellerRemarks() {
        return sellerRemarks;
    }

    public void setSellerRemarks(String sellerRemarks) {
        this.sellerRemarks = sellerRemarks;
    }

    public String getBuyerRemarks() {
        return buyerRemarks;
    }

    public void setBuyerRemarks(String buyerRemarks) {
        this.buyerRemarks = buyerRemarks;
    }

    public Integer getIsImmediatePerformance() {
        return isImmediatePerformance;
    }

    public void setIsImmediatePerformance(Integer isImmediatePerformance) {
        this.isImmediatePerformance = isImmediatePerformance;
    }

    public Integer getPerformanceType() {
        return performanceType;
    }

    public void setPerformanceType(Integer performanceType) {
        this.performanceType = performanceType;
    }

    public String getPerformancePlatform() {
        return performancePlatform;
    }

    public void setPerformancePlatform(String performancePlatform) {
        this.performancePlatform = performancePlatform;
    }

    public Integer getPerformanceStatus() {
        return performanceStatus;
    }

    public void setPerformanceStatus(Integer performanceStatus) {
        this.performanceStatus = performanceStatus;
    }

    public Date getOrderAt() {
        return orderAt;
    }

    public void setOrderAt(Date orderAt) {
        this.orderAt = orderAt;
    }

    public Date getPayAt() {
        return payAt;
    }

    public void setPayAt(Date payAt) {
        this.payAt = payAt;
    }

    public Integer getPayStatus() {
        return payStatus;
    }

    public void setPayStatus(Integer payStatus) {
        this.payStatus = payStatus;
    }

    public Integer getIsReceipt() {
        return isReceipt;
    }

    public void setIsReceipt(Integer isReceipt) {
        this.isReceipt = isReceipt;
    }

    public Long getPayer() {
        return payer;
    }

    public void setPayer(Long payer) {
        this.payer = payer;
    }

    public Integer getPayType() {
        return payType;
    }

    public void setPayType(Integer payType) {
        this.payType = payType;
    }

    public String getThirdPayNo() {
        return thirdPayNo;
    }

    public void setThirdPayNo(String thirdPayNo) {
        this.thirdPayNo = thirdPayNo;
    }

    public Date getCompletedAt() {
        return completedAt;
    }

    public void setCompletedAt(Date completedAt) {
        this.completedAt = completedAt;
    }

    public Integer getIsAlone() {
        return isAlone;
    }

    public void setIsAlone(Integer isAlone) {
        this.isAlone = isAlone;
    }

    public Map<String, Object> getPerformanceInfoMap() {
        return performanceInfoMap;
    }

    public void setPerformanceInfoMap(Map<String, Object> performanceInfoMap) {
        this.performanceInfoMap = performanceInfoMap;
    }

    public Map<String, Object> getExtraMap() {
        return extraMap;
    }

    public void setExtraMap(Map<String, Object> extraMap) {
        this.extraMap = extraMap;
    }

    public String getReceiptTerminal() {
        return receiptTerminal;
    }

    public void setReceiptTerminal(String receiptTerminal) {
        this.receiptTerminal = receiptTerminal;
    }

    public AddOrderAddrRequest getAddr() {
        return addr;
    }

    public void setAddr(AddOrderAddrRequest addr) {
        this.addr = addr;
    }

    public Map<String, Object> getThirdExtraMap() {
        return thirdExtraMap;
    }

    public void setThirdExtraMap(Map<String, Object> thirdExtraMap) {
        this.thirdExtraMap = thirdExtraMap;
    }

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }
}
