Added new API endpoints for suggesting collections based on existing shows and for bulk adding shows to collections. Enhanced the backend with necessary logic and DTOs to support these features. Updated the frontend to include new components for displaying collection suggestions and managing bulk additions, improving the user experience for collection management. Localization updates were made to support these new features in both English and Russian.
21 lines
1.1 KiB
C#
21 lines
1.1 KiB
C#
using LiteCqrs;
|
|
|
|
namespace TeleWave.Application.Library.Collections.Suggest;
|
|
|
|
/// <summary>Какие франшизы имеет смысл собрать из уже загруженных полнометражек.</summary>
|
|
public sealed record SuggestCollectionsQuery : IQuery<IReadOnlyList<CollectionSuggestionDto>>;
|
|
|
|
/// <param name="Key">Ключ предложения — с ним же приходит команда создания.</param>
|
|
/// <param name="Source">Откуда взялось: франшиза источника либо догадка по названиям.</param>
|
|
/// <param name="Parts">Части в предлагаемом порядке.</param>
|
|
/// <param name="AlreadyExists">Коллекция с таким названием уже есть — создавать нечего.</param>
|
|
public sealed record CollectionSuggestionDto(
|
|
string Key,
|
|
CollectionSuggestionSource Source,
|
|
string Name,
|
|
IReadOnlyList<CollectionSuggestionPartDto> Parts,
|
|
bool AlreadyExists
|
|
);
|
|
|
|
public sealed record CollectionSuggestionPartDto(Guid ShowId, string Name, int? Year);
|