|
| 1 | +package com.faforever.api.data.domain; |
| 2 | + |
| 3 | +import com.faforever.api.security.elide.permission.WriteMatchmakerMapCheck; |
| 4 | +import com.yahoo.elide.annotation.Audit; |
| 5 | +import com.yahoo.elide.annotation.Audit.Action; |
| 6 | +import com.yahoo.elide.annotation.CreatePermission; |
| 7 | +import com.yahoo.elide.annotation.DeletePermission; |
| 8 | +import com.yahoo.elide.annotation.Include; |
| 9 | +import lombok.Setter; |
| 10 | + |
| 11 | +import javax.annotation.Nullable; |
| 12 | +import javax.persistence.Column; |
| 13 | +import javax.persistence.Entity; |
| 14 | +import javax.persistence.FetchType; |
| 15 | +import javax.persistence.JoinColumn; |
| 16 | +import javax.persistence.JoinTable; |
| 17 | +import javax.persistence.ManyToMany; |
| 18 | +import javax.persistence.ManyToOne; |
| 19 | +import javax.persistence.Table; |
| 20 | +import javax.validation.constraints.NotNull; |
| 21 | +import java.util.Set; |
| 22 | + |
| 23 | +@CreatePermission(expression = WriteMatchmakerMapCheck.EXPRESSION) |
| 24 | +@DeletePermission(expression = WriteMatchmakerMapCheck.EXPRESSION) |
| 25 | +@Entity |
| 26 | +@Setter |
| 27 | +@Table(name = "matchmaker_queue_map_pool") |
| 28 | +@Include(rootLevel = true, type = MatchmakerQueueMapPool.TYPE_NAME) |
| 29 | +public class MatchmakerQueueMapPool extends AbstractEntity { |
| 30 | + |
| 31 | + public static final String TYPE_NAME = "matchmakerQueueMapPool"; |
| 32 | + |
| 33 | + private MatchmakerQueue matchmakerQueue; |
| 34 | + private Double minRating; |
| 35 | + private Double maxRating; |
| 36 | + |
| 37 | + @ManyToOne(fetch = FetchType.LAZY) |
| 38 | + @JoinColumn(name = "matchmaker_queue_id") |
| 39 | + public MatchmakerQueue getMatchmakerQueue() { |
| 40 | + return matchmakerQueue; |
| 41 | + } |
| 42 | + |
| 43 | + @Nullable |
| 44 | + @Column(name = "min_rating") |
| 45 | + public Double getMinRating() { |
| 46 | + return minRating; |
| 47 | + } |
| 48 | + |
| 49 | + @Nullable |
| 50 | + @Column(name = "max_rating") |
| 51 | + public Double getMaxRating() { |
| 52 | + return maxRating; |
| 53 | + } |
| 54 | + |
| 55 | +} |
0 commit comments