adding timer cfgs

This commit is contained in:
hz
2026-05-18 20:53:29 -05:00
parent bf75f02dbb
commit 984a82bf48
12 changed files with 177 additions and 14 deletions
+8
View File
@@ -33,6 +33,9 @@ public class LocationResponse
public string? Label { get; set; }
public int Level { get; set; }
public string? BuildingType { get; set; }
public string? BuildingStatus { get; set; }
public DateTime? BuildingStartedAtUtc { get; set; }
public DateTime? BuildingCompletesAtUtc { get; set; }
public DateTime? BuildingBuiltAtUtc { get; set; }
public DateTime? HomeAssignedAtUtc { get; set; }
public DateTime UpdatedAtUtc { get; set; }
@@ -49,6 +52,11 @@ public class LocationResponse
Label = location.Label,
Level = location.Level,
BuildingType = location.BuildingType,
BuildingStatus = location.BuildingType == "LogCamp" && string.IsNullOrWhiteSpace(location.BuildingStatus)
? "Built"
: location.BuildingStatus,
BuildingStartedAtUtc = location.BuildingStartedAtUtc,
BuildingCompletesAtUtc = location.BuildingCompletesAtUtc,
BuildingBuiltAtUtc = location.BuildingBuiltAtUtc,
HomeAssignedAtUtc = location.HomeAssignedAtUtc,
UpdatedAtUtc = location.UpdatedAtUtc,
@@ -0,0 +1,16 @@
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
namespace LocationsApi.Models;
public class GameSetting
{
[BsonId]
[BsonRepresentation(BsonType.ObjectId)]
public string Id { get; set; } = "";
public string Key { get; set; } = "";
public int IntValue { get; set; }
public DateTime CreatedAtUtc { get; set; } = DateTime.UtcNow;
public DateTime UpdatedAtUtc { get; set; } = DateTime.UtcNow;
}
@@ -17,6 +17,9 @@ public class Location
public string? Label { get; set; }
public int Level { get; set; } = 1;
public string? BuildingType { get; set; }
public string? BuildingStatus { get; set; }
public DateTime? BuildingStartedAtUtc { get; set; }
public DateTime? BuildingCompletesAtUtc { get; set; }
public DateTime? BuildingBuiltAtUtc { get; set; }
public DateTime? HomeAssignedAtUtc { get; set; }
public DateTime CreatedAtUtc { get; set; } = DateTime.UtcNow;