feat(release): front int PK with app-minted GUID EntryKey on the public addressing surface (P11 W5, 11.H)

This commit is contained in:
daniel-c-harvey
2026-06-16 17:11:55 -04:00
parent fe28573b68
commit f07d29cdcf
37 changed files with 627 additions and 160 deletions
+10 -8
View File
@@ -14,17 +14,19 @@ namespace DeepDrftPublic.Client.Common;
public static class ReleaseRoutes
{
/// <summary>
/// The dedicated detail route for a release: <c>/cuts/{id}</c>, <c>/sessions/{id}</c>, or
/// <c>/mixes/{id}</c>. Cut is the default arm so a new medium without an entry here surfaces a
/// build-visible gap rather than a silent fallthrough — extend the switch when a fourth medium lands.
/// The dedicated detail route for a release: <c>/cuts/{entryKey}</c>, <c>/sessions/{entryKey}</c>,
/// or <c>/mixes/{entryKey}</c>. The route carries the release's opaque public EntryKey (Phase 11
/// §3e) — never the transparent int PK. Cut is the default arm so a new medium without an entry
/// here surfaces a build-visible gap rather than a silent fallthrough — extend the switch when a
/// fourth medium lands.
/// </summary>
public static string DetailHref(long id, ReleaseMedium medium) => medium switch
public static string DetailHref(string entryKey, ReleaseMedium medium) => medium switch
{
ReleaseMedium.Session => $"/sessions/{id}",
ReleaseMedium.Mix => $"/mixes/{id}",
_ => $"/cuts/{id}",
ReleaseMedium.Session => $"/sessions/{entryKey}",
ReleaseMedium.Mix => $"/mixes/{entryKey}",
_ => $"/cuts/{entryKey}",
};
/// <summary>Convenience overload for call sites holding a <see cref="ReleaseDto"/>.</summary>
public static string DetailHref(ReleaseDto release) => DetailHref(release.Id, release.Medium);
public static string DetailHref(ReleaseDto release) => DetailHref(release.EntryKey, release.Medium);
}