package com.yonge.cooleshow.biz.dal.queryInfo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.yonge.cooleshow.biz.dal.enums.FeatureType;
import com.yonge.cooleshow.biz.dal.enums.HeardLevelEnum;
import com.yonge.toolset.base.page.QueryInfo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

public class SysMusicCompareRecordQueryInfo {

    @Data
    public static class TeacherCompareRecordQueryInfo extends QueryInfo{
        private Long userId;

        private Long teacherId;

        private String startTime;

        private String endTime;

        private String musicGroupId;

        private int orderType;

        @ApiModelProperty("排序字段：TRAINDAYS(训练天数);TRAINTIME(训练时长);TRAINNUM(训练次数)")
        private String sortField = "TRAINDAYS";

        private FeatureType featureType;

        private HeardLevelEnum heardLevel;

        private Boolean visitFlag;

        private Integer organId;

        private String clientId;
    }

    @Data
    public static class WechatCompareRecordQueryInfo extends QueryInfo{
        @ApiModelProperty(name = "训练开始时间(年月日 时分秒)")
        private String startTime;

        @ApiModelProperty(name = "训练结束时间(年月日 时分秒)")
        private String endTime;

        @ApiModelProperty(name = "机构编号")
        private Long tenantId;

        @ApiModelProperty(name = "最小训练总时长")
        private Integer minTrainTimes;

        @ApiModelProperty(name = "最大训练总时长")
        private Integer maxTrainTimes;

        @ApiModelProperty(name = "最小训练天数")
        private Integer minTrainDays;

        @ApiModelProperty(name = "最大训练天数")
        private Integer maxTrainDays;

        @ApiModelProperty(name = "最小平均训练时长")
        private Integer minAvgTrainTimes;

        @ApiModelProperty(name = "最大平均训练时长")
        private Integer maxAvgTrainTimes;

        @ApiModelProperty(name = "排序字段")
        private String sortField = "trainTimes";

        @ApiModelProperty(name = "排序方式")
        private String sortType = "DESC";

        @ApiModelProperty(name = "客户端")
        private String clientId = "student";
    }

    @Data
    public static class StudentCompareRecordQueryInfo extends QueryInfo{
        @ApiModelProperty(name = "机构编号")
        private Long tenantId;

        @ApiModelProperty(name = "学员编号")
        private Long userId;

        @ApiModelProperty(name = "开始时间")
        private String startTime;

        @ApiModelProperty(name = "截止时间")
        private String endTime;

        private HeardLevelEnum heardLevel;

        @ApiModelProperty(name = "0查询时长榜，1查询高分榜，2查询天数榜")
        private int orderType;
    }

    @Data
    public static class StatDto {

        private MusicCompareRankingDto head;

        private Object detail;
    }

    @Data
    public static class MusicCompareRankingDto {

        @ApiModelProperty("用户编号")
        private Long userId;

        @ApiModelProperty("头像")
        private String avatar;

        @ApiModelProperty("学员姓名")
        private String studentName;

        @ApiModelProperty("声部编号")
        private Integer subjectId;

        @ApiModelProperty("声部名称")
        private String subjectName;

        @ApiModelProperty("演奏曲目")
        private String musicScoreName;

        @ApiModelProperty("排名")
        private int rankNum = -1;

        @ApiModelProperty("得分")
        private int score;

        @ApiModelProperty("训练天数")
        private int trainDays = 0;

        @ApiModelProperty("训练时长")
        private int trainTime = 0;

        @ApiModelProperty("训练次数")
        private int trainNum = 0;

        @ApiModelProperty("是否是会员")
        private int vipUser;

        @ApiModelProperty("学生总数")
        private int studentNum;
    }

    @Data
    public static class WechatCompareRecordPageDto{
        @ApiModelProperty(name = "用户编号")
        @ExcelProperty(value = "用户编号")
        private Long userId;

        @ApiModelProperty(name = "头像")
        @ExcelProperty(value = "头像")
        private String avatar;

        @ApiModelProperty(name = "姓名")
        @ExcelProperty(value = "姓名")
        private String username;

        @ApiModelProperty(name = "声部")
        @ExcelProperty(value = "声部")
        private String subjectName;

        @ApiModelProperty(name = "训练总时长")
        @ExcelProperty(value = "训练总时长")
        private Integer trainTimes = 0;

        @ApiModelProperty(name = "训练天数")
        @ExcelProperty(value = "训练天数")
        private Integer trainDays = 0;

        @ApiModelProperty(name = "平均训练时长")
        @ExcelProperty(value = "平均训练时长")
        private Integer avgTrainTimes = 0;

    }
    @Data
    public static class WechatCompareRecordExportDto{
        @ExcelProperty(value = "姓名")
        private String username;

        @ExcelProperty(value = "声部")
        private String subjectName;

        @ExcelProperty(value = "平均训练时长")
        private Integer avgTrainTimes = 0;

        @ExcelProperty(value = "总时长")
        private Integer trainTimes = 0;

        @ExcelProperty(value = "训练天数")
        private Integer trainDays = 0;

    }

    @Data
    public static class WechatCompareRecordDto{

        @ApiModelProperty(name = "列表数据")
        private List<WechatCompareRecordPageDto> page;

        @ApiModelProperty(name = "汇总")
        private WechatCompareRecordSumDto sumDto;
    }
    @Data
    public static class WechatCompareRecordSumDto{
        @ApiModelProperty(name = "总人数")
        private Integer studentNum;

        @ApiModelProperty(name = "训练天数")
        private Integer trainDays;

        @ApiModelProperty(name = "训练时长")
        private Integer trainTimes;

        @ApiModelProperty(name = "平均训练天数")
        private Integer avgTrainDays;

        @ApiModelProperty(name = "平均训练时长")
        private Integer avgTrainTimes;
    }

    @Data
    public static class StudentMusicCompareRecordQuery extends QueryInfo{
        @ApiModelProperty("月份")
        private String month;

        @ApiModelProperty("用户ID")
        private Long userId;

        private Long tenantId;
    }

    @Data
    public static class StudentMusicCompareRecord{
        @ApiModelProperty("乐谱名称")
        private String musicSheetName;

        @ApiModelProperty("ID")
        private Long id;

        @ApiModelProperty("用户ID")
        private Long userId;

        @ApiModelProperty("得分数据")
        private String scoreData;

        @ApiModelProperty("得分")
        private int score;

        @ApiModelProperty("音准")
        private int intonation;

        @ApiModelProperty("节奏")
        private int cadence;

        @ApiModelProperty("完整性")
        private int integrity;

        @ApiModelProperty("录音文件地址")
        private String recordFilePath;

        @ApiModelProperty("视频文件地址")
        private String videoFilePath;

        @ApiModelProperty("难度")
        private HeardLevelEnum heardLevel;

        @ApiModelProperty("创建时间")
        private String createTime;
    }
    @Data
    public static class StudentMusicCompareRecordStat{
        @ApiModelProperty("头像")
        private String avatar;

        @ApiModelProperty("用户编号")
        private Long userId;

        @ApiModelProperty("用户姓名")
        private String username;

        @ApiModelProperty("声部")
        private String subjectName;

        @ApiModelProperty("练习时长(秒)")
        private int trainTime;

        @ApiModelProperty("练习天数")
        private int trainDays;
    }
    @Data
    public static class StudentMusicCompareRecordDto{

        @ApiModelProperty("平均练习时长(秒)")
        private Integer avgTrainTime = 0;

        @ApiModelProperty("练习时长(秒)")
        private Integer trainTime = 0;

        @ApiModelProperty("练习天数")
        private Integer trainDays = 0;

        @ApiModelProperty("练习次数")
        private Integer trainNum = 0;
    }
}
