package com.rongyichuang.activity.entity; import com.rongyichuang.common.entity.BaseEntity; import jakarta.persistence.*; import java.math.BigDecimal; /** * 活动选手评分实体类 * 对应数据库表:t_activity_player_rating */ @Entity @Table(name = "t_activity_player_rating") public class ActivityPlayerRating extends BaseEntity { /** * 活动ID */ @Column(name = "activity_id", nullable = false) private Long activityId; /** * 活动选手ID */ @Column(name = "activity_player_id", nullable = false) private Long activityPlayerId; /** * 选手ID */ @Column(name = "player_id", nullable = false) private Long playerId; /** * 评委ID */ @Column(name = "judge_id", nullable = false) private Long judgeId; /** * 评分方案ID */ @Column(name = "rating_scheme_id", nullable = false) private Long ratingSchemeId; /** * 总分 */ @Column(name = "total_score", precision = 10, scale = 2) private BigDecimal totalScore; /** * 评分状态:0-未评分,1-已评分 */ @Column(name = "status", nullable = false) private Integer status = 0; /** * 评分备注 */ @Column(name = "remark", length = 500) private String remark; // 构造函数 public ActivityPlayerRating() {} public ActivityPlayerRating(Long activityId, Long activityPlayerId, Long playerId, Long judgeId, Long ratingSchemeId) { this.activityId = activityId; this.activityPlayerId = activityPlayerId; this.playerId = playerId; this.judgeId = judgeId; this.ratingSchemeId = ratingSchemeId; this.status = 0; } // Getter和Setter方法 public Long getActivityId() { return activityId; } public void setActivityId(Long activityId) { this.activityId = activityId; } public Long getActivityPlayerId() { return activityPlayerId; } public void setActivityPlayerId(Long activityPlayerId) { this.activityPlayerId = activityPlayerId; } public Long getPlayerId() { return playerId; } public void setPlayerId(Long playerId) { this.playerId = playerId; } public Long getJudgeId() { return judgeId; } public void setJudgeId(Long judgeId) { this.judgeId = judgeId; } public Long getRatingSchemeId() { return ratingSchemeId; } public void setRatingSchemeId(Long ratingSchemeId) { this.ratingSchemeId = ratingSchemeId; } public BigDecimal getTotalScore() { return totalScore; } public void setTotalScore(BigDecimal totalScore) { this.totalScore = totalScore; } public Integer getStatus() { return status; } public void setStatus(Integer status) { this.status = status; } public String getRemark() { return remark; } public void setRemark(String remark) { this.remark = remark; } @Override public String toString() { return "ActivityPlayerRating{" + "id=" + getId() + ", activityId=" + activityId + ", activityPlayerId=" + activityPlayerId + ", playerId=" + playerId + ", judgeId=" + judgeId + ", ratingSchemeId=" + ratingSchemeId + ", totalScore=" + totalScore + ", status=" + status + ", remark='" + remark + '\'' + '}'; } }