-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from Gamify-IT/feature/refactor
refactor
- Loading branch information
Showing
9 changed files
with
204 additions
and
152 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
4 changes: 2 additions & 2 deletions
4
src/main/java/de/unistuttgart/towercrushbackend/data/websockets/DeveloperMessage.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 |
---|---|---|
@@ -1,17 +1,17 @@ | ||
package de.unistuttgart.towercrushbackend.data.websockets; | ||
|
||
import java.util.List; | ||
import lombok.AccessLevel; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
import lombok.experimental.FieldDefaults; | ||
|
||
import java.util.List; | ||
|
||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@FieldDefaults(level = AccessLevel.PRIVATE) | ||
public class DeveloperMessage implements Message { | ||
|
||
List<Lobby> lobbyList; | ||
} |
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
29 changes: 29 additions & 0 deletions
29
src/main/java/de/unistuttgart/towercrushbackend/data/websockets/Team.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,29 @@ | ||
package de.unistuttgart.towercrushbackend.data.websockets; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnore; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
|
||
import javax.persistence.*; | ||
import java.util.HashSet; | ||
import java.util.Set; | ||
import java.util.UUID; | ||
|
||
@AllArgsConstructor | ||
@Data | ||
@Embeddable | ||
@Entity | ||
public class Team { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.AUTO) | ||
@JsonIgnore | ||
private UUID id; | ||
|
||
@ManyToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY) | ||
private Set<Player> players; | ||
|
||
public Team() { | ||
this.players = new HashSet<>(); | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
src/main/java/de/unistuttgart/towercrushbackend/data/websockets/TeamVotes.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,29 @@ | ||
package de.unistuttgart.towercrushbackend.data.websockets; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnore; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
|
||
import javax.persistence.*; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
import java.util.UUID; | ||
|
||
@AllArgsConstructor | ||
@Data | ||
@Embeddable | ||
@Entity | ||
public class TeamVotes { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.AUTO) | ||
@JsonIgnore | ||
private UUID id; | ||
|
||
@ManyToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY) | ||
private List<Vote> votes; | ||
|
||
public TeamVotes() { | ||
this.votes = new ArrayList<>(); | ||
} | ||
} |
Oops, something went wrong.