package com.starry.admin.modules.statistics.module.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.Collections;
import java.util.List;
import lombok.Data;

/**
 * 店员业绩详情组成。
 */
@Data
@ApiModel("店员业绩详情组成数据")
public class ClerkPerformanceDetailCompositionVo {

    @ApiModelProperty("订单构成")
    private List<CompositionSlice> orderComposition = Collections.emptyList();

    @ApiModelProperty("金额构成")
    private List<CompositionSlice> amountComposition = Collections.emptyList();

    @ApiModelProperty("顾客构成")
    private List<CompositionSlice> customerComposition = Collections.emptyList();

    @Data
    @ApiModel("业绩组成占比")
    public static class CompositionSlice {

        @ApiModelProperty("标识")
        private String key;

        @ApiModelProperty("名称")
        private String label;

        @ApiModelProperty("数量")
        private Integer count;

        @ApiModelProperty("数量占比")
        private BigDecimal countRatio = BigDecimal.ZERO;

        @ApiModelProperty("金额")
        private BigDecimal amount = BigDecimal.ZERO;

        @ApiModelProperty("金额占比")
        private BigDecimal amountRatio = BigDecimal.ZERO;
    }
}
