Skip to content

Commit fef06d1

Browse files
committed
haul logo and countrycode from ctf.json to scoreboard.json
1 parent 5da0a4d commit fef06d1

File tree

8 files changed

+27
-6
lines changed

8 files changed

+27
-6
lines changed

Directory.Build.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
1212
<PublishRepositoryUrl>true</PublishRepositoryUrl>
1313
<CodeAnalysisRuleSet>../ENOWARS.ruleset</CodeAnalysisRuleSet>
14-
<AssemblyVersion>0.1.1.0</AssemblyVersion>
15-
<FileVersion>0.1.1.0</FileVersion>
16-
<Version>0.1.1</Version>
14+
<AssemblyVersion>0.1.2.0</AssemblyVersion>
15+
<FileVersion>0.1.2.0</FileVersion>
16+
<Version>0.1.2</Version>
1717
</PropertyGroup>
1818
</Project>

EnoCore/Models/Team.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ public class Team
1010
#pragma warning disable SA1516 // Elements should be separated by blank line
1111
public long Id { get; set; }
1212
public string Name { get; set; }
13+
public string? LogoUrl { get; set; }
14+
public string? CountryCode { get; set; }
1315
public byte[] TeamSubnet { get; set; }
1416
public double TotalPoints { get; set; }
1517
public double AttackPoints { get; set; }

EnoCore/Scoreboard/Scoreboard.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ public record ScoreboardFirstBlood(
3333
public record ScoreboardTeam(
3434
string Name,
3535
long TeamId,
36+
string? LogoUrl,
37+
string? CountryCode,
3638
double TotalPoints,
3739
double AttackPoints,
3840
double LostDefensePoints,

EnoDatabase/EnoDatabase.Scoring.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,8 @@ public async Task<Scoreboard> GetCurrentScoreboard(long roundId)
257257
scoreboardTeams.Add(new ScoreboardTeam(
258258
team.Name,
259259
team.Id,
260+
team.LogoUrl,
261+
team.CountryCode,
260262
team.TotalPoints,
261263
team.AttackPoints,
262264
team.DefensePoints,

EnoDatabase/EnoDatabase.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ public void ApplyConfig(Configuration config)
9292
{
9393
TeamSubnet = team.TeamSubnet,
9494
Name = team.Name,
95+
LogoUrl = team.LogoUrl,
96+
CountryCode = team.CountryFlagUrl,
9597
Id = team.Id,
9698
Active = team.Active,
9799
Address = team.Address,

EnoDatabase/Migrations/20201112232849_InitialMigrations.Designer.cs renamed to EnoDatabase/Migrations/20210416170157_InitialMigrations.Designer.cs

Lines changed: 7 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

EnoDatabase/Migrations/20201112232849_InitialMigrations.cs renamed to EnoDatabase/Migrations/20210416170157_InitialMigrations.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// <auto-generated />
2-
using System;
1+
using System;
32
using Microsoft.EntityFrameworkCore.Migrations;
43
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
54

@@ -113,6 +112,8 @@ protected override void Up(MigrationBuilder migrationBuilder)
113112
Id = table.Column<long>(type: "bigint", nullable: false)
114113
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
115114
Name = table.Column<string>(type: "text", nullable: false),
115+
LogoUrl = table.Column<string>(type: "text", nullable: true),
116+
CountryCode = table.Column<string>(type: "text", nullable: true),
116117
TeamSubnet = table.Column<byte[]>(type: "bytea", nullable: false),
117118
TotalPoints = table.Column<double>(type: "double precision", nullable: false),
118119
AttackPoints = table.Column<double>(type: "double precision", nullable: false),

EnoDatabase/Migrations/EnoDatabaseContextModelSnapshot.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,15 @@ protected override void BuildModel(ModelBuilder modelBuilder)
219219
b.Property<double>("AttackPoints")
220220
.HasColumnType("double precision");
221221

222+
b.Property<string>("CountryCode")
223+
.HasColumnType("text");
224+
222225
b.Property<double>("DefensePoints")
223226
.HasColumnType("double precision");
224227

228+
b.Property<string>("LogoUrl")
229+
.HasColumnType("text");
230+
225231
b.Property<string>("Name")
226232
.IsRequired()
227233
.HasColumnType("text");

0 commit comments

Comments
 (0)