package com.cool.store.vo.order;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
public class MiniStoreOrderDetailVO {

    @ApiModelProperty("下单信息")
    private OrderInfoVO orderInfo;

    @ApiModelProperty("付款信息")
    private PayInfoVO payInfo;

    @ApiModelProperty("加盟类费用明细")
    private FeeInfoVO feeInfo;

    @ApiModelProperty("装修与设备选型信息(按配置类型/配置项分组)")
    private List<CategoryVO> configSnapshot;

    @Data
    public static class OrderInfoVO {

        @ApiModelProperty("门店ID")
        private Long shopId;

        private String storeId;

        @ApiModelProperty("订单ID")
        private Long orderId ;

        @ApiModelProperty("门店订购订单号")
        private String orderNo;

        @ApiModelProperty(name = "门店类型ID")
        private Long storeTypeId;

        @ApiModelProperty("门店类型")
        private Integer storeType;

        private String storeTypeName;

        @ApiModelProperty("下单时间")
        private Date createTime;

        @ApiModelProperty("状态：0待确认/1已确认/2已取消/3已支付")
        private Integer status;

        @ApiModelProperty("加盟商姓名")
        private String partnerName;

        @ApiModelProperty("手机号")
        private String partnerMobile;

        @ApiModelProperty("招商经理")
        private String investmentManager;

        @ApiModelProperty("招商经理名称")
        private String investmentManagerName;
    }

    @Data
    public static class PayInfoVO {
        @ApiModelProperty("订单总额")
        private BigDecimal totalAmount;

        @ApiModelProperty("已支付金额")
        private BigDecimal paidAmount;

        @ApiModelProperty("未支付金额")
        private BigDecimal unpaidAmount;
    }

    @Data
    public static class FeeInfoVO {
        @ApiModelProperty("加盟费")
        private BigDecimal franchiseFee;

        @ApiModelProperty("品牌使用费")
        private BigDecimal brandUsageFee;

        @ApiModelProperty("管理费")
        private BigDecimal managementFee;

        @ApiModelProperty("系统使用费")
        private BigDecimal systemUsageFee;

        @ApiModelProperty("合同保证金")
        private BigDecimal contractDeposit;

        @ApiModelProperty("设备保证金")
        private BigDecimal deviceDeposit;

        @ApiModelProperty("首次订货费用")
        private BigDecimal firstOrderFee;

        @ApiModelProperty("加盟类费用总计")
        private BigDecimal storeFixedAmount;

        @ApiModelProperty("设计费")
        private BigDecimal designFee;

        @ApiModelProperty("原设计费")
        private BigDecimal originalDesignFee;

        @ApiModelProperty("原加盟费")
        private BigDecimal originalFranchiseFee;

        @ApiModelProperty("原品牌使用费")
        private BigDecimal originalBrandUsageFee;

        @ApiModelProperty("原管理费")
        private BigDecimal originalManagementFee;

        @ApiModelProperty("原系统使用费")
        private BigDecimal originalSystemUsageFee;

        @ApiModelProperty("原合同保证金")
        private BigDecimal originalContractDeposit;

        @ApiModelProperty("原设备保证金")
        private BigDecimal originalDeviceDeposit;

        @ApiModelProperty("原首次订货费用")
        private BigDecimal originalFirstOrderFee;

        @ApiModelProperty("原加盟类费用总计")
        private BigDecimal originalStoreFixedAmount;
    }

    @Data
    public static class CategoryVO {
        @ApiModelProperty("配置类型编码")
        private String categoryCode;

        @ApiModelProperty("配置类型名称")
        private String categoryName;

        @ApiModelProperty("配置项列表")
        private List<ItemVO> items;
    }

    @Data
    public static class ItemVO {
        @ApiModelProperty("配置项编码")
        private String itemCode;

        @ApiModelProperty("配置项名称")
        private String itemName;

        @ApiModelProperty("选项列表")
        private List<OptionVO> options;
    }

    @Data
    public static class OptionVO {
        @ApiModelProperty("选项ID")
        private Long optionId;

        @ApiModelProperty("选项名称")
        private String optionName;

        @ApiModelProperty("单价")
        private BigDecimal optionPrice;

        @ApiModelProperty("原价")
        private BigDecimal originalOptionPrice;

        @ApiModelProperty("数量")
        private BigDecimal quantity;

        @ApiModelProperty("选项名称")
        private String optionUnit;

        @ApiModelProperty("小计")
        private BigDecimal amount;

        @ApiModelProperty("原价小计")
        private BigDecimal originalAmount;

        @ApiModelProperty("图片")
        private String imageUrl;

        @ApiModelProperty("费用类型code")
        private String expenseTypeCode;

        private BigDecimal defaultQuantity;

        private String optionRemark;
    }
}
