package cn.newfeifan.mall.module.product.controller.admin.spuapply.vo;

import cn.newfeifan.mall.framework.excel.core.annotations.DictFormat;
import cn.newfeifan.mall.framework.excel.core.convert.DictConvert;
import cn.newfeifan.mall.framework.excel.core.convert.MoneyConvert;
import cn.newfeifan.mall.module.product.controller.admin.skuapply.vo.SkuApplyRespVO;
import cn.newfeifan.mall.module.product.enums.DictTypeConstants;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;

@Schema(description = "管理后台 - 商品spu申请 Response VO")
@Data
@ExcelIgnoreUnannotated
public class SpuApplyRespVO {

    @Schema(description = "商品 SPU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "111")
    @ExcelProperty("商品编号")
    private Long id;

    @Schema(description = "商品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "清凉小短袖")
    @ExcelProperty("商品名称")
    private String name;

    @Schema(description = "关键字", requiredMode = Schema.RequiredMode.REQUIRED, example = "清凉丝滑不出汗")
    @ExcelProperty("关键字")
    private String keyword;

    @Schema(description = "商品简介", requiredMode = Schema.RequiredMode.REQUIRED, example = "清凉小短袖简介")
    @ExcelProperty("商品简介")
    private String introduction;

    @Schema(description = "商品详情", requiredMode = Schema.RequiredMode.REQUIRED, example = "清凉小短袖详情")
    @ExcelProperty("商品详情")
    private String description;

    @Schema(description = "商品分类编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @ExcelProperty("商品分类编号")
    private Long categoryId;

    @Schema(description = "商品品牌编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @ExcelProperty("商品品牌编号")
    private Long brandId;

    @Schema(description = "商品封面图", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.zhongxing.cn/xx.png")
    @ExcelProperty("商品封面图")
    private String picUrl;

    @Schema(description = "商品轮播图", requiredMode = Schema.RequiredMode.REQUIRED, example = "[https://www.zhongxing.cn/xx.png, https://www.zhongxing.cn/xxx.png]")
    private List<String> sliderPicUrls;

    @Schema(description = "排序字段", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @ExcelProperty("排序字段")
    private Integer sort;

    @Schema(description = "商品状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @ExcelProperty(value = "商品状态", converter = DictConvert.class)
    @DictFormat(DictTypeConstants.PRODUCT_SPU_STATUS)
    private Integer status;

    @Schema(description = "商品创建时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2023-05-24 00:00:00")
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

    // ========== SKU 相关字段 =========

    @Schema(description = "规格类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
    @ExcelProperty("规格类型")
    private Boolean specType;

    @Schema(description = "商品价格", requiredMode = Schema.RequiredMode.REQUIRED, example = "1999")
    @ExcelProperty(value = "商品价格", converter = MoneyConvert.class)
    private Integer price;

    @Schema(description = "市场价，单位使用：分", requiredMode = Schema.RequiredMode.REQUIRED, example = "199")
    @ExcelProperty(value = "市场价", converter = MoneyConvert.class)
    private Integer marketPrice;

    @Schema(description = "成本价，单位使用：分", requiredMode = Schema.RequiredMode.REQUIRED, example = "19")
    @ExcelProperty(value = "成本价", converter = MoneyConvert.class)
    private Integer costPrice;

    @Schema(description = "商品库存", requiredMode = Schema.RequiredMode.REQUIRED, example = "10000")
    @ExcelProperty("库存")
    private Integer stock;

    @Schema(description = "SKU 数组")
    private List<SkuApplyRespVO> skus;

    // ========== 物流相关字段 =========

    @Schema(description = "配送方式数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private List<Integer> deliveryTypes;

    @Schema(description = "物流配置模板编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "111")
    @ExcelProperty("物流配置模板编号")
    private Long deliveryTemplateId;

    // ========== 营销相关字段 =========

    @Schema(description = "赠送积分", requiredMode = Schema.RequiredMode.REQUIRED, example = "111")
    @ExcelProperty("赠送积分")
    private Integer giveIntegral;

    @Schema(description = "分销类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
    @ExcelProperty("分销类型")
    private Boolean subCommissionType;

    // ========== 统计相关字段 =========

    @Schema(description = "商品销量", requiredMode = Schema.RequiredMode.REQUIRED, example = "2000")
    @ExcelProperty("商品销量")
    private Integer salesCount;

    @Schema(description = "虚拟销量", example = "66")
    @ExcelProperty("虚拟销量")
    private Integer virtualSalesCount;

    @Schema(description = "浏览量", requiredMode = Schema.RequiredMode.REQUIRED, example = "888")
    @ExcelProperty("商品点击量")
    private Integer browseCount;

    @Schema(description = "产地")
    private String producerArea;

    @Schema(description = "商品类别", example = "1")
    private Integer spuType;

    @Schema(description = "店铺id", example = "20588")
    private Long shopId;

    @Schema(description = "店铺名称", example = "中星温暖")
    private String shopName;

    @Schema(description = "商户id", example = "8240")
    private Long merchantId;
    @Schema(description = "商品支付类别")
    private Integer spuPayType;

    @Schema(description = "推广费, 单位: 分，值为sku中最大的推广费")
    private Integer promotionFee;

    @Schema(description = "高精度", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("高精度")
    private Boolean highPrecision;

    @Schema(description = "高精度价格", example = "9255")
    @ExcelProperty("高精度价格")
    private BigDecimal highPrecisionPrice;

    @Schema(description = "申请用户id", example = "22602")
    @ExcelProperty("申请用户id")
    private Long applyMemberUserId;

    @Schema(description = "审核系统用户id", example = "22820")
    @ExcelProperty("审核系统用户id")
    private Long checkSystemUserId;

    @Schema(description = "审核时间")
    @ExcelProperty("审核时间")
    private LocalDateTime checkTime;

    @Schema(description = "审核意见")
    @ExcelProperty("审核意见")
    private String checkComment;

    @Schema(description = "审核状态：默认0表示未审核，1审核通过，2审核不通过", example = "1")
    @ExcelProperty("审核状态：默认0表示未审核，1审核通过，2审核不通过")
    private Integer checkStatus;

}