Added initial voice work edit logic (set favorite / delete) on Api and UI layers.
This commit is contained in:
@@ -5,6 +5,8 @@ using JSMR.Application.Scanning;
|
||||
using JSMR.Application.Tags.Commands.SetEnglishName;
|
||||
using JSMR.Application.Tags.Commands.UpdateTagStatus;
|
||||
using JSMR.Application.Tags.Queries.Search;
|
||||
using JSMR.Application.VoiceWorks.Commands.Delete;
|
||||
using JSMR.Application.VoiceWorks.Commands.SetFavorite;
|
||||
using JSMR.Application.VoiceWorks.Queries.Search;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
@@ -18,6 +20,9 @@ public static class ApplicationServiceCollectionExtensions
|
||||
services.AddScoped<SearchCirclesHandler>();
|
||||
|
||||
services.AddScoped<SearchVoiceWorksHandler>();
|
||||
services.AddScoped<SetVoiceWorkFavoriteHandler>();
|
||||
services.AddScoped<DeleteVoiceWorkHandler>();
|
||||
|
||||
services.AddScoped<ScanVoiceWorksHandler>();
|
||||
|
||||
services.AddScoped<SearchTagsHandler>();
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace JSMR.Application.VoiceWorks.Commands.Delete;
|
||||
|
||||
public sealed class DeleteVoiceWorkFavoriteHandler(IVoiceWorkWriter writer)
|
||||
public sealed class DeleteVoiceWorkHandler(IVoiceWorkWriter writer)
|
||||
{
|
||||
public async Task<DeleteVoiceWorkResponse> HandleAsync(DeleteVoiceWorkRequest request, CancellationToken cancellationToken = default)
|
||||
{
|
||||
|
||||
@@ -4,29 +4,29 @@ namespace JSMR.Application.VoiceWorks.Queries.Search;
|
||||
|
||||
public record VoiceWorkSearchResult
|
||||
{
|
||||
public int VoiceWorkId { get; init; }
|
||||
public required string ProductId { get; init; }
|
||||
public string? OriginalProductId { get; init; }
|
||||
public string? Description { get; init; }
|
||||
public required string ProductName { get; init; }
|
||||
public required string ProductUrl { get; init; }
|
||||
public bool HasImage { get; init; }
|
||||
public required string Maker { get; init; }
|
||||
public required string MakerId { get; init; }
|
||||
public DateTime? ExpectedDate { get; init; }
|
||||
public DateTime? SalesDate { get; init; }
|
||||
public DateTime? PlannedReleaseDate { get; init; }
|
||||
public int? Downloads { get; init; }
|
||||
public int? WishlistCount { get; init; }
|
||||
public byte? StarRating { get; init; }
|
||||
public int? Votes { get; init; }
|
||||
public bool HasTrial { get; init; }
|
||||
public bool HasChobit { get; init; }
|
||||
public AgeRating Rating { get; init; }
|
||||
public bool Favorite { get; init; }
|
||||
public byte Status { get; init; }
|
||||
public byte SubtitleLanguage { get; init; }
|
||||
public bool? IsValid { get; init; }
|
||||
public int VoiceWorkId { get; set; }
|
||||
public required string ProductId { get; set; }
|
||||
public string? OriginalProductId { get; set; }
|
||||
public string? Description { get; set; }
|
||||
public required string ProductName { get; set; }
|
||||
public required string ProductUrl { get; set; }
|
||||
public bool HasImage { get; set; }
|
||||
public required string Maker { get; set; }
|
||||
public required string MakerId { get; set; }
|
||||
public DateTime? ExpectedDate { get; set; }
|
||||
public DateTime? SalesDate { get; set; }
|
||||
public DateTime? PlannedReleaseDate { get; set; }
|
||||
public int? Downloads { get; set; }
|
||||
public int? WishlistCount { get; set; }
|
||||
public byte? StarRating { get; set; }
|
||||
public int? Votes { get; set; }
|
||||
public bool HasTrial { get; set; }
|
||||
public bool HasChobit { get; set; }
|
||||
public AgeRating Rating { get; set; }
|
||||
public bool Favorite { get; set; }
|
||||
public byte Status { get; set; }
|
||||
public byte SubtitleLanguage { get; set; }
|
||||
public bool? IsValid { get; set; }
|
||||
public required VoiceWorkCircleItem Circle { get; set; }
|
||||
public VoiceWorkCircleItem? OriginalCircle { get; set; }
|
||||
public VoiceWorkTagItem[] Tags { get; set; } = [];
|
||||
|
||||
Reference in New Issue
Block a user