Merge pull request 'Add TeamColor' (#85) from team-color into master
Reviewed-by: Lixfel <lixfel@steamwar.de>
Dieser Commit ist enthalten in:
Commit
731cb9968b
@ -29,18 +29,20 @@ public class Team {
|
||||
private final String teamKuerzel;
|
||||
private final String teamName;
|
||||
private final int teamLeader;
|
||||
private final String teamColor;
|
||||
|
||||
private static final Team pub = new Team(0, "PUB", "Öffentlich", 0);
|
||||
private static final Team pub = new Team(0, "PUB", "Öffentlich", 0, "8");
|
||||
|
||||
private Team(int teamId, String teamKuerzel, String teamName, int teamLeader){
|
||||
private Team(int teamId, String teamKuerzel, String teamName, int teamLeader, String teamColor){
|
||||
this.teamId = teamId;
|
||||
this.teamKuerzel = teamKuerzel;
|
||||
this.teamName = teamName;
|
||||
this.teamLeader = teamLeader;
|
||||
this.teamColor = teamColor;
|
||||
}
|
||||
|
||||
private Team(ResultSet rs) throws SQLException {
|
||||
this(rs.getInt("TeamID"), rs.getString("TeamKuerzel"), rs.getString("TeamName"), rs.getInt("TeamLeader"));
|
||||
this(rs.getInt("TeamID"), rs.getString("TeamKuerzel"), rs.getString("TeamName"), rs.getInt("TeamLeader"), rs.getString("TeamColor"));
|
||||
}
|
||||
|
||||
public static Team get(int id){
|
||||
@ -72,6 +74,10 @@ public class Team {
|
||||
return teamLeader;
|
||||
}
|
||||
|
||||
public String getTeamColor() {
|
||||
return teamColor;
|
||||
}
|
||||
|
||||
public List<Integer> getMembers(){
|
||||
try{
|
||||
ResultSet memberlist = SQL.select("SELECT id FROM UserData WHERE Team = ?", teamId);
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren