package com.cool.store.vo.order;

import com.cool.store.enums.FranchiseBrandEnum;
import com.cool.store.enums.StoreTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

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

@Data
public class MiniStoreWishlistListVO {

    @ApiModelProperty("心愿单ID")
    private Long wishlistId;

    @ApiModelProperty("店型ID")
    private Long storeTypeId;

    private Long pointId;

    private Long shopId;

    private Integer wishlistStatus;

    private Long lineId;

    private String partnerName;

    private String partnerMobile;

    @ApiModelProperty("品牌")
    private String brand;

    @ApiModelProperty("品牌名称")
    private String brandName;

    @ApiModelProperty("店型名称")
    private String storeTypeName;

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

    @ApiModelProperty("门店类型名称")
    private String typeName;

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

    @ApiModelProperty("创建时间")
    private Date createTime;

    @ApiModelProperty("总额")
    private BigDecimal totalAmount;

    @ApiModelProperty("版本号")
    private String versionNo;

    @ApiModelProperty("配置项列表")
    private List<OptionVO> options;

    public String getTypeName() {
        return StoreTypeEnum.getMessage(this.storeType);
    }

    public String getBrandName() {
        return FranchiseBrandEnum.getDescByCode(this.brand);
    }

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

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

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

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

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