Add versioning, content, and chat presence/notifications services

- SOR.Versioning: version.check handler, ClientRelease entity + admin UI
- SOR.Content: incremental card sync (DefinitionVersion cursor via Postgres trigger),
  content.sync / content.sets / content.card handlers
- Chat: presence (account_presence) + notifications with unread count and mark-read
- CardDefinition: DefinitionVersion bigint (trigger-assigned) + IsRetired soft-delete
- 3 migrations applied to pg-forge-01 (Identity, Chat, Catalog)

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
dingo
2026-02-25 20:35:35 -05:00
co-authored by Claude Happy
parent 348c37b9b5
commit 4663003dd7
40 changed files with 2494 additions and 1 deletions
@@ -0,0 +1,31 @@
namespace SOR.Database.Entities.Identity;
/// <summary>
/// Represents a published client release for a given platform.
/// Used by the version check service to inform clients whether an update is available
/// or required before they can play.
/// </summary>
public sealed class ClientRelease
{
public Guid Id { get; set; } = Guid.NewGuid();
/// <summary>Platform identifier: "android", "ios", "pc", "web".</summary>
public string Platform { get; set; } = string.Empty;
/// <summary>Semantic version string, e.g. "1.2.3".</summary>
public string Version { get; set; } = string.Empty;
/// <summary>If true, clients on any older version must update before playing.</summary>
public bool IsRequired { get; set; }
/// <summary>Direct download or store URL for this release.</summary>
public string? DownloadUrl { get; set; }
/// <summary>Human-readable release notes shown in the update prompt.</summary>
public string? ReleaseNotes { get; set; }
/// <summary>Inactive releases are ignored by the version check.</summary>
public bool IsActive { get; set; }
public DateTimeOffset ReleasedAt { get; set; }
}