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

import com.yonge.cooleshow.biz.dal.entity.ActivityPlan;
import com.yonge.cooleshow.biz.dal.entity.ActivityReward;
import com.yonge.cooleshow.common.enums.YesOrNoEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

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

/**
 * Description 活动信息
 *
 * @author liujunchi
 * @date 2022-08-04
 */
@ApiModel("活动信息")
public class MusicActivityVo extends ActivityPlan {

    @ApiModelProperty("活动曲目")
    private List<ActivityMusicVo> activityMusicVoList;

    @ApiModelProperty("活动奖品")
    private List<ActivityReward> activityRewardList;

    @ApiModelProperty("评测难度 BEGINNER 入门级 ADVANCED 进阶级 PERFORMER 大师级")
    private String  evaluationDifficulty;

    @ApiModelProperty("是否已经报名参与 0 ：否 1：是")
    private YesOrNoEnum join;

    @ApiModelProperty("活动声部信息")
    private List<SubjectInfo> subjectInfos;

    public YesOrNoEnum getJoin() {
        return join;
    }

    public void setJoin(YesOrNoEnum join) {
        this.join = join;
    }

    public List<ActivityMusicVo> getActivityMusicVoList() {
        return activityMusicVoList;
    }

    public void setActivityMusicVoList(List<ActivityMusicVo> activityMusicVoList) {
        this.activityMusicVoList = activityMusicVoList;
    }

    public List<ActivityReward> getActivityRewardList() {
        return activityRewardList;
    }

    public void setActivityRewardList(List<ActivityReward> activityRewardList) {
        this.activityRewardList = activityRewardList;
    }

    public String getEvaluationDifficulty() {
        return evaluationDifficulty;
    }

    public void setEvaluationDifficulty(String evaluationDifficulty) {
        this.evaluationDifficulty = evaluationDifficulty;
    }

    public List<SubjectInfo> getSubjectInfos() {
        return subjectInfos;
    }

    public void setSubjectInfos(List<SubjectInfo> subjectInfos) {
        this.subjectInfos = subjectInfos;
    }

    /**
     * 活动曲目声部信息
     */
    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class SubjectInfo implements Serializable {

        @ApiModelProperty("声部ID")
        private String subjectId;

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

        @ApiModelProperty("是否已经报名参与 ")
        private Integer join;

        @ApiModelProperty("最高分")
        private double score;

        @ApiModelProperty("最高分的用户id")
        private Long userId;

        @ApiModelProperty("最高分用户头像")
        private String userAvatar;

        @ApiModelProperty("最高分用户声部")
        private String userSubject;

        @ApiModelProperty("最高分用户名")
        private String username;

        @ApiModelProperty("声部曲目数")
        private Integer musicNums;


        public SubjectInfo score(double score) {
            this.score = score;
            return this;
        }

        public SubjectInfo userId(Long userId) {
            this.userId = userId;
            return this;
        }

        public SubjectInfo userAvatar(String userAvatar) {
            this.userAvatar = userAvatar;
            return this;
        }

        public SubjectInfo username(String username) {
            this.username = username;
            return this;
        }

        public SubjectInfo userSubject(String userSubject) {
            this.userSubject = userSubject;
            return this;
        }
    }
}
