package com.neusoft.smart.pos.printer.service.bean;


import lombok.Data;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/**
 * @author yangmanyu
 * @ClassName //类名
 * @todo //实现的主要功能
 * @date 2018/5/15 13:54
 */
@Data
public class OrderBean {
    
    
    /**
     * orderNumber : 824016425412
     * locationNo : 001
     * orderAmount : 21.99
     * realPayAmount : 21.99
     * discountAmount : 0
     * orderStatus : 2
     * orderStatusName : 已付款
     * orderType : 4
     * paidTime : 2018-05-10 10:47:32
     * orderDetails : [{"itemName":"商品1","unitPrice":12.99,"quantity":1,"discountAmount":0,"finalPrice":12.99},{"itemName":"商品3","unitPrice":5,"quantity":1,"discountAmount":0,"finalPrice":5},{"itemName":"商品2","unitPrice":2,"quantity":2,"discountAmount":0,"finalPrice":4}]
     */
    private String orderNumber;
    
    private String locationNo;
    
    private BigDecimal orderAmount;
    
    private BigDecimal realPayAmount;
    
    private BigDecimal discountAmount;
    
    private String orderStatus;
    
    private String orderStatusName;
    
    private String orderType;
    
    private long paidTime;
    
    private int isPrint = 0; //打印状态
    
    private int isAdhesiveStickerPrint = 0; //打印状态
    
    private long id;
    
    //持有订单详情的集合
    private List<OrderDetailBean> orderDetails = new ArrayList<>();
    
    @Data
    public static class OrderDetailBean {
        
        
        /**
         * itemName : 商品1
         * unitPrice : 12.99
         * quantity : 1
         * discountAmount : 0
         * finalPrice : 12.99
         * categoryName :商品所属类别名称
         * categoryNumber :商品所属类别编号
         * selectedFlavors : 口味
         * remark : 备注
         */
        private String itemName;
        
        private BigDecimal unitPrice;
        
        private int quantity;
        
        private BigDecimal discountAmount;
        
        private BigDecimal finalPrice;
        
        private String categoryName;
        
        private String categoryNumber;
        
        private String selectedFlavors;
        
        private String remark;
        
        //持有orderBean的引用
        private OrderBean orderBean;
        
        private long orderId;
        
        
    }
}
