package com.sundot.airport.exam.dto;

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

/**
 * <b>功能名：</b>UserProfileDTO<br>
 * <b>说明：</b> 用户画像响应DTO <br>
 * <b>著作权：</b> Copyright (C) 2025 SUNDOT CORPORATION<br>
 * <b>修改履历：
 *
 * @author Claude
 */
public class UserProfileDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 用户名
     */
    private String userName;

    /**
     * 部门名称
     */
    private String deptName;

    /**
     * 角色名称
     */
    private String roleName;

    /**
     * 统计周期
     */
    private String period;

    /**
     * 测试平均分 - 抽问抽答板块
     */
    private ScoreStatistics scoreStats;

    /**
     * 排名统计
     */
    private RankingStatistics rankingStats;

    /**
     * 测试总错题数量
     */
    private Integer totalErrors;

    /**
     * 各分类错题统计（动态）
     */
    private java.util.List<CategoryErrorStatistics> categoryErrors;

    /**
     * 分数统计内部类
     */
    public static class ScoreStatistics implements Serializable {
        private static final long serialVersionUID = 1L;

        /**
         * 周期内个体平均分
         */
        private BigDecimal userAvgScore;

        /**
         * 周期内个体最高分
         */
        private BigDecimal userMaxScore;

        /**
         * 周期内个体最低分
         */
        private BigDecimal userMinScore;

        /**
         * 周期内总平均分 (所有用户)
         */
        private BigDecimal totalAvgScore;

        public BigDecimal getUserAvgScore() {
            return userAvgScore;
        }

        public void setUserAvgScore(BigDecimal userAvgScore) {
            this.userAvgScore = userAvgScore;
        }

        public BigDecimal getUserMaxScore() {
            return userMaxScore;
        }

        public void setUserMaxScore(BigDecimal userMaxScore) {
            this.userMaxScore = userMaxScore;
        }

        public BigDecimal getUserMinScore() {
            return userMinScore;
        }

        public void setUserMinScore(BigDecimal userMinScore) {
            this.userMinScore = userMinScore;
        }

        public BigDecimal getTotalAvgScore() {
            return totalAvgScore;
        }

        public void setTotalAvgScore(BigDecimal totalAvgScore) {
            this.totalAvgScore = totalAvgScore;
        }
    }

    /**
     * 排名统计内部类
     */
    public static class RankingStatistics implements Serializable {
        private static final long serialVersionUID = 1L;

        /**
         * 全站排名
         */
        private Integer siteRanking;

        /**
         * 全站总人数
         */
        private Integer siteTotalUsers;

        /**
         * 本科室排名
         */
        private Integer deptRanking;

        /**
         * 本科室总人数
         */
        private Integer deptTotalUsers;

        /**
         * 本班组排名（按角色）
         */
        private Integer teamRanking;

        /**
         * 本班组总人数（按角色）
         */
        private Integer teamTotalUsers;

        public Integer getSiteRanking() {
            return siteRanking;
        }

        public void setSiteRanking(Integer siteRanking) {
            this.siteRanking = siteRanking;
        }

        public Integer getSiteTotalUsers() {
            return siteTotalUsers;
        }

        public void setSiteTotalUsers(Integer siteTotalUsers) {
            this.siteTotalUsers = siteTotalUsers;
        }

        public Integer getDeptRanking() {
            return deptRanking;
        }

        public void setDeptRanking(Integer deptRanking) {
            this.deptRanking = deptRanking;
        }

        public Integer getDeptTotalUsers() {
            return deptTotalUsers;
        }

        public void setDeptTotalUsers(Integer deptTotalUsers) {
            this.deptTotalUsers = deptTotalUsers;
        }

        public Integer getTeamRanking() {
            return teamRanking;
        }

        public void setTeamRanking(Integer teamRanking) {
            this.teamRanking = teamRanking;
        }

        public Integer getTeamTotalUsers() {
            return teamTotalUsers;
        }

        public void setTeamTotalUsers(Integer teamTotalUsers) {
            this.teamTotalUsers = teamTotalUsers;
        }
    }

    /**
     * 分类错题统计内部类
     */
    public static class CategoryErrorStatistics implements Serializable {
        private static final long serialVersionUID = 1L;

        /**
         * 分类ID
         */
        private String categoryId;

        /**
         * 分类名称
         */
        private String categoryName;

        /**
         * 错题数量
         */
        private Integer errorCount;

        public String getCategoryId() {
            return categoryId;
        }

        public void setCategoryId(String categoryId) {
            this.categoryId = categoryId;
        }

        public String getCategoryName() {
            return categoryName;
        }

        public void setCategoryName(String categoryName) {
            this.categoryName = categoryName;
        }

        public Integer getErrorCount() {
            return errorCount;
        }

        public void setErrorCount(Integer errorCount) {
            this.errorCount = errorCount;
        }
    }

    // Getters and Setters

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public String getPeriod() {
        return period;
    }

    public void setPeriod(String period) {
        this.period = period;
    }

    public ScoreStatistics getScoreStats() {
        return scoreStats;
    }

    public void setScoreStats(ScoreStatistics scoreStats) {
        this.scoreStats = scoreStats;
    }

    public RankingStatistics getRankingStats() {
        return rankingStats;
    }

    public void setRankingStats(RankingStatistics rankingStats) {
        this.rankingStats = rankingStats;
    }

    public Integer getTotalErrors() {
        return totalErrors;
    }

    public void setTotalErrors(Integer totalErrors) {
        this.totalErrors = totalErrors;
    }

    public java.util.List<CategoryErrorStatistics> getCategoryErrors() {
        return categoryErrors;
    }

    public void setCategoryErrors(java.util.List<CategoryErrorStatistics> categoryErrors) {
        this.categoryErrors = categoryErrors;
    }
}
