diff --git a/src/main/java/com/warhammer/domain/Army.java b/src/main/java/com/warhammer/domain/Army.java index c0b567f5..57f37a07 100644 --- a/src/main/java/com/warhammer/domain/Army.java +++ b/src/main/java/com/warhammer/domain/Army.java @@ -56,6 +56,9 @@ public class Army implements Serializable { @Column(name = "battles_won") private Long battlesWon; + @Column(name = "battles_tied") + private Long battlesTied; + @ManyToOne(optional = false) @NotNull @JsonIgnoreProperties(value = "armies", allowSetters = true) @@ -230,6 +233,20 @@ public class Army implements Serializable { this.battlesWon = battlesWon; } + public Long getBattlesTied() { + return battlesTied; + } + + public Army battlesTied(Long battlesTied) { + this.battlesTied = battlesTied; + return this; + + } + + public void setBattlesTied(Long battlesTied) { + this.battlesTied = battlesTied; + } + // public Long getCodexSpecificPoints() { // return codexSpecificPoints; // } @@ -278,6 +295,7 @@ public class Army implements Serializable { // ", armyCodexSpecificPoints=" + getCodexSpecificPoints() + ", battleTally=" + getBattleTally() + ", battlesWon=" + getBattlesWon() + + ", battlesTied=" + getBattlesTied() + "}"; } } diff --git a/src/main/java/com/warhammer/service/dto/ArmyDTO.java b/src/main/java/com/warhammer/service/dto/ArmyDTO.java index 27e68bed..4c914c5a 100644 --- a/src/main/java/com/warhammer/service/dto/ArmyDTO.java +++ b/src/main/java/com/warhammer/service/dto/ArmyDTO.java @@ -2,11 +2,10 @@ package com.warhammer.service.dto; import com.warhammer.domain.UnitArmy; -import javax.persistence.Column; -import javax.validation.constraints.*; +import javax.persistence.Lob; +import javax.validation.constraints.NotNull; import java.io.Serializable; import java.util.Set; -import javax.persistence.Lob; /** * A DTO for the {@link com.warhammer.domain.Army} entity. @@ -39,6 +38,8 @@ public class ArmyDTO implements Serializable { private Long battlesWon; + private Long battlesTied; + private Set units; public Long getId() { @@ -121,6 +122,14 @@ public class ArmyDTO implements Serializable { this.battlesWon = battlesWon; } + public Long getBattlesTied() { + return battlesTied; + } + + public void setBattlesTied(Long battlesTied) { + this.battlesTied = battlesTied; + } + public String getOwnerLogin() { return ownerLogin; } @@ -177,6 +186,7 @@ public class ArmyDTO implements Serializable { ", requisition=" + getRequisition() + ", battleTally=" + getBattleTally() + ", battlesWon=" + getBattlesWon() + + ", battlesTied=" + getBattlesTied() + ", ownerId=" + getOwnerId() + ", ownerLogin='" + getOwnerLogin() + "'" + ", units='" + getUnits() + diff --git a/src/main/resources/config/liquibase/changelog/20220315083700_add_tie_tally.xml b/src/main/resources/config/liquibase/changelog/20220315083700_add_tie_tally.xml new file mode 100644 index 00000000..87c11a87 --- /dev/null +++ b/src/main/resources/config/liquibase/changelog/20220315083700_add_tie_tally.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + diff --git a/src/main/resources/config/liquibase/master.xml b/src/main/resources/config/liquibase/master.xml index 38da8746..82bd5993 100644 --- a/src/main/resources/config/liquibase/master.xml +++ b/src/main/resources/config/liquibase/master.xml @@ -24,6 +24,8 @@ + + diff --git a/src/main/webapp/app/entities/army/army-detail-desktop.component.html b/src/main/webapp/app/entities/army/army-detail-desktop.component.html index f5f720b4..32c1860c 100644 --- a/src/main/webapp/app/entities/army/army-detail-desktop.component.html +++ b/src/main/webapp/app/entities/army/army-detail-desktop.component.html @@ -35,16 +35,18 @@
-
BATTLE TALLY
-
BATTLES WON
+
BATTLE TALLY
+
BATTLES WON
+
BATTLES TIED
REQUISITION POINTS
SUPPLY USED
SUPPLY LIMIT
FORCE POINTS
-
{{ army.battleTally }}
-
{{ army.battlesWon }}
+
{{ army.battleTally }}
+
{{ army.battlesWon }}
+
{{ army.battlesTied }}
{{ army.requisition }}
diff --git a/src/main/webapp/app/entities/army/army-detail-mobile.html b/src/main/webapp/app/entities/army/army-detail-mobile.html index 605ba550..3380f799 100644 --- a/src/main/webapp/app/entities/army/army-detail-mobile.html +++ b/src/main/webapp/app/entities/army/army-detail-mobile.html @@ -21,6 +21,10 @@
Victory
{{army.battlesWon}}
+
+
Tied
+
{{army.battlesTied}}
+
RP:
{{army.requisition}}
diff --git a/src/main/webapp/app/entities/army/army-update.component.html b/src/main/webapp/app/entities/army/army-update.component.html index 15985c7a..00cb6c86 100644 --- a/src/main/webapp/app/entities/army/army-update.component.html +++ b/src/main/webapp/app/entities/army/army-update.component.html @@ -71,6 +71,12 @@ formControlName="battlesWon"/>
+
+ + +
+