
package com.tmerclub.cloud.order.vo;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import lombok.Data;
import lombok.ToString;

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

/**
 * 订单excel信息
 *
 * @author YXF
 * @date 2020-3-9
 */
@Data
@ToString
public class PurchaseOrderExcelVO implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    /**
     * excel 信息
     */
    public static final String EXCEL_NAME = "订单信息";
    /**
     * 哪一行开始导出
     */
    public static final int MERGE_ROW_INDEX = 2;
    /**
     * 需要合并的列数组
     */
    public static final int[] MERGE_COLUMN_INDEX = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};

    @ExcelProperty(value = {"订单信息", "序号"}, index = 0)
    private String seq;

    @ExcelProperty(value = {"订单信息", "订单ID"}, index = 1)
    private String purchaseOrderId;

    @DateTimeFormat("yyyy-MM-dd")
    @ExcelProperty(value = {"订单信息", "下单时间"}, index = 2)
    private Date createTime;

    @ExcelProperty(value = {"订单信息", "配送类型"}, index = 3)
    private String deliveryType;

    @ExcelProperty(value = {"订单信息", "收货人姓名"}, index = 4)
    private String consignee;

    @ExcelProperty(value = {"订单信息", "收货人手机"}, index = 5)
    private String mobile;

    @ExcelProperty(value = {"订单信息", "收货地址"}, index = 6)
    private String receivingAddr;

    @ExcelProperty(value = {"订单信息", "订单总额"}, index = 7)
    private String totalAmount;

    @ExcelProperty(value = {"订单信息", "支付类型"}, index = 8)
    private String payType;

    @ExcelProperty(value = {"订单信息", "订单状态"}, index = 9)
    private String status;

    @ExcelProperty({"订单项信息", "商品名称"})
    private String spuName;

    @ExcelProperty({"订单项信息", "sku名称"})
    private String skuName;

    @ExcelProperty({"订单项信息", "商品价格"})
    private String purchasePrice;

    @ExcelProperty({"订单项信息", "商品数量"})
    private Integer purchaseStock;

    @ExcelProperty({"订单项信息", "商品总金额"})
    private String purchaseAmount;

    @ExcelIgnore
    private List<PurchaseOrderItemLangVO> orderItemLangList;

}
