-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Conflicts: # build.gradle
- Loading branch information
Showing
26 changed files
with
599 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/main/java/com/faforever/api/data/checks/permission/HasLadder1v1Update.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.faforever.api.data.checks.permission; | ||
|
||
public class HasLadder1v1Update { | ||
|
||
public static final String EXPRESSION = "Ladder1v1.Update"; | ||
|
||
public static class Inline extends BasePermission { | ||
public Inline() { | ||
super(HasLadder1v1Update.EXPRESSION); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package com.faforever.api.data.domain; | ||
|
||
import com.yahoo.elide.annotation.Include; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.NoArgsConstructor; | ||
import lombok.ToString; | ||
|
||
import javax.persistence.Column; | ||
import javax.persistence.Entity; | ||
import javax.persistence.GeneratedValue; | ||
import javax.persistence.GenerationType; | ||
import javax.persistence.Id; | ||
import javax.persistence.Table; | ||
|
||
@Entity | ||
@Table(name = "ladder_division") | ||
@Include(rootLevel = true) | ||
@Data | ||
@NoArgsConstructor | ||
@EqualsAndHashCode(of = "id") | ||
@ToString(of = {"id", "league", "name", "threshold"}, includeFieldNames = false) | ||
public class Division { | ||
private int id; | ||
private String name; | ||
private int league; | ||
private int threshold; | ||
|
||
@Id | ||
@Column(name = "id") | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
public int getId() { | ||
return id; | ||
} | ||
|
||
@Column(name = "name", nullable = false) | ||
public String getName() { | ||
return name; | ||
} | ||
|
||
@Column(name = "league") | ||
public int getLeague() { | ||
return league; | ||
} | ||
|
||
@Column(name = "threshold") | ||
public int getThreshold() { | ||
return threshold; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
src/main/java/com/faforever/api/data/domain/Ladder1v1Map.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package com.faforever.api.data.domain; | ||
|
||
import com.faforever.api.data.checks.permission.HasLadder1v1Update; | ||
import com.yahoo.elide.annotation.CreatePermission; | ||
import com.yahoo.elide.annotation.DeletePermission; | ||
import com.yahoo.elide.annotation.Include; | ||
import lombok.Setter; | ||
import org.hibernate.annotations.Immutable; | ||
|
||
import javax.persistence.Column; | ||
import javax.persistence.Entity; | ||
import javax.persistence.GeneratedValue; | ||
import javax.persistence.GenerationType; | ||
import javax.persistence.Id; | ||
import javax.persistence.JoinColumn; | ||
import javax.persistence.OneToOne; | ||
import javax.persistence.Table; | ||
|
||
@CreatePermission(expression = HasLadder1v1Update.EXPRESSION) | ||
@DeletePermission(expression = HasLadder1v1Update.EXPRESSION) | ||
@Entity | ||
@Setter | ||
@Table(name = "ladder_map") | ||
@Include(rootLevel = true, type = "ladder1v1Map") | ||
@Immutable | ||
public class Ladder1v1Map { | ||
private int id; | ||
private MapVersion mapVersion; | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "id") | ||
public int getId() { | ||
return id; | ||
} | ||
|
||
@OneToOne | ||
@JoinColumn(name = "idmap") | ||
public MapVersion getMapVersion() { | ||
return mapVersion; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.