package shop.alien.entity.store.vo;

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

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * 商家经营统计数据VO
 *
 * @author system
 * @version 1.0
 * @date 2026/01/05
 */
@Data
@ApiModel(value = "StoreOperationalStatisticsVo对象", description = "商家经营统计数据")
public class StoreOperationalStatisticsVo implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 流量数据
     */
    @ApiModelProperty("流量数据")
    private TrafficData trafficData;

    /**
     * 互动数据
     */
    @ApiModelProperty("互动数据")
    private InteractionData interactionData;

    /**
     * 优惠券数据
     */
    @ApiModelProperty("优惠券数据")
    private CouponData couponData;

    /**
     * 代金券数据
     */
    @ApiModelProperty("代金券数据")
    private VoucherData voucherData;

    /**
     * 服务质量数据
     */
    @ApiModelProperty("服务质量数据")
    private ServiceQualityData serviceQualityData;

    /**
     * 价目表排名数据
     */
    @ApiModelProperty("价目表排名数据")
    private List<PriceListRanking> priceListRanking;

    /**
     * 流量数据
     */
    @Data
    @ApiModel("流量数据")
    public static class TrafficData implements Serializable {
        @ApiModelProperty("店铺搜索量")
        private Long storeSearchVolume;

        @ApiModelProperty("浏览量")
        private Long pageViews;

        @ApiModelProperty("访客数")
        private Long visitors;

        @ApiModelProperty("新增访客数")
        private Long newVisitors;

        @ApiModelProperty("访问时长（秒）")
        private Long visitDuration;

        @ApiModelProperty("平均访问时长（秒）")
        private Long avgVisitDuration;
    }

    /**
     * 互动数据
     */
    @Data
    @ApiModel("互动数据")
    public static class InteractionData implements Serializable {
        @ApiModelProperty("店铺收藏次数")
        private Long storeCollectionCount;

        @ApiModelProperty("店铺分享次数")
        private Long storeShareCount;

        @ApiModelProperty("店铺打卡次数")
        private Long storeCheckInCount;

        @ApiModelProperty("咨询商家次数")
        private Long consultMerchantCount;

        @ApiModelProperty("好友数量")
        private Long friendsCount;

        @ApiModelProperty("关注数量")
        private Long followCount;

        @ApiModelProperty("粉丝数量")
        private Long fansCount;

        @ApiModelProperty("发布动态数量")
        private Long postsPublishedCount;

        @ApiModelProperty("动态点赞数量")
        private Long postLikesCount;

        @ApiModelProperty("动态评论数量")
        private Long postCommentsCount;

        @ApiModelProperty("动态转发数量")
        private Long postSharesCount;

        @ApiModelProperty("被举报次数")
        private Long reportedCount;

        @ApiModelProperty("被拉黑次数")
        private Long blockedCount;
    }

    /**
     * 优惠券数据
     */
    @Data
    @ApiModel("优惠券数据")
    public static class CouponData implements Serializable {
        @ApiModelProperty("赠送好友数量")
        private Long giftToFriendsCount;

        @ApiModelProperty("赠送好友金额合计")
        private BigDecimal giftToFriendsAmount;

        @ApiModelProperty("赠送好友使用数量")
        private Long giftToFriendsUsedCount;

        @ApiModelProperty("赠送好友使用金额合计")
        private BigDecimal giftToFriendsUsedAmount;

        @ApiModelProperty("赠送好友使用金额占比")
        private BigDecimal giftToFriendsUsedAmountRatio;

        @ApiModelProperty("好友赠送数量")
        private Long friendsGiftCount;

        @ApiModelProperty("好友赠送金额合计")
        private BigDecimal friendsGiftAmount;

        @ApiModelProperty("好友赠送使用数量")
        private Long friendsGiftUsedCount;

        @ApiModelProperty("好友赠送使用金额合计")
        private BigDecimal friendsGiftUsedAmount;

        @ApiModelProperty("好友赠送使用金额占比")
        private BigDecimal friendsGiftUsedAmountRatio;
    }

    /**
     * 代金券数据
     */
    @Data
    @ApiModel("代金券数据")
    public static class VoucherData implements Serializable {
        @ApiModelProperty("赠送好友数量")
        private Long giftToFriendsCount;

        @ApiModelProperty("赠送好友金额合计")
        private BigDecimal giftToFriendsAmount;

        @ApiModelProperty("赠送好友使用数量")
        private Long giftToFriendsUsedCount;

        @ApiModelProperty("赠送好友使用金额合计")
        private BigDecimal giftToFriendsUsedAmount;

        @ApiModelProperty("赠送好友使用金额占比")
        private BigDecimal giftToFriendsUsedAmountRatio;

        @ApiModelProperty("好友赠送数量")
        private Long friendsGiftCount;

        @ApiModelProperty("好友赠送金额合计")
        private BigDecimal friendsGiftAmount;

        @ApiModelProperty("好友赠送使用数量")
        private Long friendsGiftUsedCount;

        @ApiModelProperty("好友赠送使用金额合计")
        private BigDecimal friendsGiftUsedAmount;

        @ApiModelProperty("好友赠送使用金额占比")
        private BigDecimal friendsGiftUsedAmountRatio;
    }

    /**
     * 服务质量数据
     */
    @Data
    @ApiModel("服务质量数据")
    public static class ServiceQualityData implements Serializable {
        @ApiModelProperty("店铺评分")
        private BigDecimal storeRating;

        @ApiModelProperty("评分1")
        private BigDecimal scoreOne;

        @ApiModelProperty("评分2")
        private BigDecimal scoreTwo;

        @ApiModelProperty("评分3")
        private BigDecimal scoreThree;

        @ApiModelProperty("评价数量")
        private Long totalReviews;

        @ApiModelProperty("好评数量")
        private Long positiveReviews;

        @ApiModelProperty("中评数量")
        private Long neutralReviews;

        @ApiModelProperty("差评数量")
        private Long negativeReviews;

        @ApiModelProperty("差评占比")
        private BigDecimal negativeReviewRatio;

        @ApiModelProperty("差评申诉次数")
        private Long negativeReviewAppealsCount;

        @ApiModelProperty("差评申诉成功次数")
        private Long negativeReviewAppealsSuccessCount;

        @ApiModelProperty("差评申诉成功占比")
        private BigDecimal negativeReviewAppealsSuccessRatio;
    }

    /**
     * 价目表排名
     */
    @Data
    @ApiModel("价目表排名")
    public static class PriceListRanking implements Serializable {
        @ApiModelProperty("排名")
        private Integer rank;

        @ApiModelProperty("价目表ID")
        private Integer priceId;

        @ApiModelProperty("价目表名称")
        private String priceListItemName;

        @ApiModelProperty("浏览量")
        private Long pageViews;

        @ApiModelProperty("访客数")
        private Long visitors;

        @ApiModelProperty("分享数")
        private Long shares;
    }
}
