package org.springblade.modules.martial.pojo.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

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

/**
 * 小程序评分详情VO
 *
 * @author BladeX
 */
@Data
@Schema(description = "小程序评分详情")
public class MiniScoreDetailVO implements Serializable {

	private static final long serialVersionUID = 1L;

	@Schema(description = "选手信息")
	private AthleteInfo athleteInfo;

	@Schema(description = "评委评分列表")
	private List<JudgeScore> judgeScores;

	@Schema(description = "主裁判修改信息")
	private Modification modification;

	/**
	 * 选手信息内部类
	 */
	@Data
	@Schema(description = "选手信息")
	public static class AthleteInfo implements Serializable {

		private static final long serialVersionUID = 1L;

		@Schema(description = "选手ID")
		private Long athleteId;

		@Schema(description = "选手姓名")
		private String name;

		@Schema(description = "身份证号")
		private String idCard;

		@Schema(description = "队伍名称")
		private String team;

		@Schema(description = "参赛编号")
		private String number;

		@Schema(description = "总分")
		private BigDecimal totalScore;
	}

	/**
	 * 评委评分内部类
	 */
	@Data
	@Schema(description = "评委评分")
	public static class JudgeScore implements Serializable {

		private static final long serialVersionUID = 1L;

		@Schema(description = "评委ID")
		private Long judgeId;

		@Schema(description = "评委姓名")
		private String judgeName;

		@Schema(description = "评分")
		private BigDecimal score;

		@Schema(description = "评分时间")
		private LocalDateTime scoreTime;

		@Schema(description = "备注")
		private String note;
	}

	/**
	 * 主裁判修改信息内部类
	 */
	@Data
	@Schema(description = "主裁判修改信息")
	public static class Modification implements Serializable {

		private static final long serialVersionUID = 1L;

		@Schema(description = "原始分数")
		private BigDecimal originalScore;

		@Schema(description = "修改后分数")
		private BigDecimal modifiedScore;

		@Schema(description = "修改者ID")
		private Long modifierId;

		@Schema(description = "修改者姓名")
		private String modifierName;

		@Schema(description = "修改原因")
		private String modifyReason;

		@Schema(description = "修改时间")
		private LocalDateTime modifyTime;
	}
}
