Add audience categorization for shows: implement ShowAudience type, update related API endpoints, and enhance frontend components for audience selection and display. Modify data structures to support audience information in show creation and retrieval processes.
build / backend (push) Successful in 3m35s
build / frontend (push) Successful in 52s
tests / backend-tests (push) Successful in 3m27s

This commit is contained in:
Leonid Pershin
2026-07-26 02:06:08 +03:00
parent 525fd2ee01
commit 8962840654
19 changed files with 1900 additions and 8 deletions
+10 -1
View File
@@ -18,6 +18,10 @@ public class Show
public string? Description { get; private set; }
public ShowKind Kind { get; private set; }
/// <summary>Категория аудитории (обычное/детское/взрослое) — под будущие фильтры показа.</summary>
public ShowAudience Audience { get; private set; }
public DateTimeOffset CreatedAt { get; private set; }
// ── Метаданные (TMDb/OMDb/вручную) ──
@@ -42,7 +46,8 @@ public class Show
string name,
ShowKind kind,
string? description = null,
string? originalName = null
string? originalName = null,
ShowAudience audience = ShowAudience.General
) =>
new()
{
@@ -51,9 +56,13 @@ public class Show
OriginalName = Normalize(originalName),
Kind = kind,
Description = description,
Audience = audience,
CreatedAt = DateTimeOffset.UtcNow,
};
/// <summary>Задать категорию аудитории (обычное/детское/взрослое).</summary>
public void SetAudience(ShowAudience audience) => Audience = audience;
public void Rename(string name, string? description)
{
Name = name;