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

import com.alibaba.fastjson.JSON;
import com.zm.order.tool.server.model.*;

import java.util.List;

/**
 * 整合创建订单参数
 *
 * @author nianchang
 * @ClassName BaseCreateOrderDTO
 * @date 2021/08/24 8:04 下午
 */
public class BaseCreateOrderDTO {

    /**
     * 订单
     */
    private Order order;

    /**
     * 商品列表
     */
    private List<OrderItem> itemList;

    /**
     * 优惠列表
     */
    private List<OrderDiscount> discountList;

    /**
     * 创建订单参数
     */
    private OrderOperateDTO operateDTO;

    /**
     * 订单地址
     */
    private OrderAddr orderAddr;

    /**
     * 商品加料列表
     */
    private List<OrderItemBatching> itemBatchingList;

    /**
     * 订单支付明细
     */
    private List<OrderPayDetails> payDetailsList;

    /**
     * 订单扩展信息
     */
    private OrderExtends orderExtends;

    /**
     * 更新订单标记
     * 1：不创建
     */
    private Integer updateOrderFlag;

    /**
     * 订单历史用户id
     */
    private Long oldUserId;

    /**
     * 更新索引标记
     * 0：不更新
     */
    private Integer updateIndexFlag;

    public Integer getUpdateIndexFlag() {
        return updateIndexFlag;
    }

    public void setUpdateIndexFlag(Integer updateIndexFlag) {
        this.updateIndexFlag = updateIndexFlag;
    }

    public Long getOldUserId() {
        return oldUserId;
    }

    public void setOldUserId(Long oldUserId) {
        this.oldUserId = oldUserId;
    }

    public Integer getUpdateOrderFlag() {
        return updateOrderFlag;
    }

    public void setUpdateOrderFlag(Integer updateOrderFlag) {
        this.updateOrderFlag = updateOrderFlag;
    }

    public Order getOrder() {
        return order;
    }

    public void setOrder(Order order) {
        this.order = order;
    }

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

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

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

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

    public OrderOperateDTO getOperateDTO() {
        return operateDTO;
    }

    public void setOperateDTO(OrderOperateDTO operateDTO) {
        this.operateDTO = operateDTO;
    }

    public OrderAddr getOrderAddr() {
        return orderAddr;
    }

    public void setOrderAddr(OrderAddr orderAddr) {
        this.orderAddr = orderAddr;
    }

    public List<OrderItemBatching> getItemBatchingList() {
        return itemBatchingList;
    }

    public void setItemBatchingList(List<OrderItemBatching> itemBatchingList) {
        this.itemBatchingList = itemBatchingList;
    }

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

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

    public OrderExtends getOrderExtends() {
        return orderExtends;
    }

    public void setOrderExtends(OrderExtends orderExtends) {
        this.orderExtends = orderExtends;
    }

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