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

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

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

/**
 * 小程序选手列表VO
 * 
 * 注意：Long类型的ID字段使用ToStringSerializer序列化为字符串，
 * 避免JavaScript大数精度丢失问题
 *
 * @author BladeX
 */
@Data
@Schema(description = "小程序选手列表")
@JsonInclude(JsonInclude.Include.ALWAYS)
public class MiniAthleteListVO implements Serializable {

	private static final long serialVersionUID = 1L;

	@Schema(description = "选手ID")
	@JsonProperty("athleteId")
	@JsonSerialize(using = ToStringSerializer.class)
	private Long athleteId;

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

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

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

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

	@Schema(description = "项目名称")
	@JsonProperty("projectName")
	private String projectName;

	@Schema(description = "出场顺序")
	@JsonProperty("orderNum")
	private Integer orderNum;

	@Schema(description = "是否已评分（当前裁判）")
	@JsonProperty("scored")
	private Boolean scored = false;

	@Schema(description = "我的评分（当前裁判的评分）")
	@JsonProperty("myScore")
	private BigDecimal myScore;

	@Schema(description = "总分（只有所有裁判评分完成后才显示）")
	@JsonProperty("totalScore")
	private BigDecimal totalScore;

	@Schema(description = "已评分裁判数量")
	@JsonProperty("scoredJudgeCount")
	private Integer scoredJudgeCount;

	@Schema(description = "应评分裁判总数")
	@JsonProperty("requiredJudgeCount")
	private Integer requiredJudgeCount;

	@Schema(description = "评分是否完成（所有裁判都已评分）")
	@JsonProperty("scoringComplete")
	private Boolean scoringComplete = false;

	@Schema(description = "比赛状态（0-待出场,1-进行中,2-已完成）")
	@JsonProperty("competitionStatus")
	private Integer competitionStatus;
}
