Moved relevant application layer enums and value objects to the domain layer.
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
namespace JSMR.Application.Common;
|
||||
|
||||
public enum AIGeneration
|
||||
{
|
||||
None = 0,
|
||||
Partial = 1,
|
||||
Full = 2
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
namespace JSMR.Application.Common;
|
||||
|
||||
public enum AgeRating
|
||||
{
|
||||
AllAges = 1,
|
||||
R15 = 2,
|
||||
R18 = 3
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
namespace JSMR.Application.Common;
|
||||
|
||||
public interface ISupportedLanguage
|
||||
{
|
||||
string Code { get; }
|
||||
Language Language { get; }
|
||||
}
|
||||
//public interface ISupportedLanguage
|
||||
//{
|
||||
// string Code { get; }
|
||||
// Language Language { get; }
|
||||
//}
|
||||
@@ -1,11 +0,0 @@
|
||||
namespace JSMR.Application.Common;
|
||||
|
||||
public enum Language
|
||||
{
|
||||
Unknown = -1,
|
||||
Japanese = 0,
|
||||
English = 1,
|
||||
ChineseSimplified = 2,
|
||||
ChineseTraditional = 3,
|
||||
Korean = 4
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
namespace JSMR.Application.Common;
|
||||
|
||||
public enum VoiceWorkStatus
|
||||
{
|
||||
Available = 0,
|
||||
Upcoming = 1,
|
||||
NewRelease = 2,
|
||||
NewAndUpcoming = 3
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace JSMR.Application.Common;
|
||||
namespace JSMR.Application.Enums;
|
||||
|
||||
public enum Locale
|
||||
{
|
||||
@@ -1,4 +1,5 @@
|
||||
using JSMR.Application.Common;
|
||||
using JSMR.Domain.Enums;
|
||||
using JSMR.Domain.ValueObjects;
|
||||
|
||||
namespace JSMR.Application.Integrations.DLSite.Models;
|
||||
|
||||
@@ -10,7 +11,7 @@ public class VoiceWorkDetails
|
||||
public int WishlistCount { get; init; }
|
||||
public int DownloadCount { get; init; }
|
||||
public DateTime? RegistrationDate { get; init; }
|
||||
public ISupportedLanguage[] SupportedLanguages { get; init; } = [];
|
||||
public SupportedLanguage[] SupportedLanguages { get; init; } = [];
|
||||
public AIGeneration AI { get; init; }
|
||||
public bool HasTrial { get; init; }
|
||||
public bool HasDLPlay { get; init; }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using JSMR.Application.Common;
|
||||
using JSMR.Domain.Enums;
|
||||
|
||||
namespace JSMR.Application.Integrations.DLSite.Models;
|
||||
|
||||
@@ -6,5 +6,6 @@ public class VoiceWorkTranslation
|
||||
{
|
||||
public required string OriginalProductId { get; init; }
|
||||
public bool IsOfficialTranslation { get; init; }
|
||||
public bool IsRecommendedTranslation { get; init; }
|
||||
public required Language Language { get; init; }
|
||||
}
|
||||
@@ -15,4 +15,8 @@
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.10" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\JSMR.Domain\JSMR.Domain.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using JSMR.Application.Common;
|
||||
using JSMR.Domain.Enums;
|
||||
|
||||
namespace JSMR.Application.Scanning.Contracts;
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using JSMR.Application.Common;
|
||||
using JSMR.Application.Integrations.DLSite.Models;
|
||||
using JSMR.Application.Integrations.DLSite.Models;
|
||||
using JSMR.Domain.Enums;
|
||||
using JSMR.Domain.ValueObjects;
|
||||
|
||||
namespace JSMR.Application.Scanning.Contracts;
|
||||
|
||||
@@ -20,10 +21,13 @@ public sealed record VoiceWorkIngest
|
||||
public int? Votes { get; init; }
|
||||
public AgeRating AgeRating { get; init; }
|
||||
public bool HasImage { get; init; }
|
||||
public ICollection<ISupportedLanguage> SupportedLanguages { get; init; } = [];
|
||||
public ICollection<SupportedLanguage> SupportedLanguages { get; init; } = [];
|
||||
public DateOnly? ExpectedDate { get; init; }
|
||||
public DateOnly? SalesDate { get; init; }
|
||||
public DateTime? RegistrationDate { get; init; }
|
||||
public AIGeneration AI { get; init; }
|
||||
public VoiceWorkSeries? Series { get; init; }
|
||||
public VoiceWorkTranslation? Translation { get; init; }
|
||||
|
||||
public static VoiceWorkIngest From(DLSiteWork work, VoiceWorkDetails? details)
|
||||
{
|
||||
@@ -47,7 +51,10 @@ public sealed record VoiceWorkIngest
|
||||
SupportedLanguages = details?.SupportedLanguages ?? [],
|
||||
ExpectedDate = work.ExpectedDate,
|
||||
SalesDate = work.SalesDate,
|
||||
RegistrationDate = details?.RegistrationDate
|
||||
RegistrationDate = details?.RegistrationDate,
|
||||
AI = details?.AI ?? AIGeneration.None,
|
||||
Series = details?.Series,
|
||||
Translation = details?.Translation
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using JSMR.Application.Common;
|
||||
using JSMR.Application.Enums;
|
||||
|
||||
namespace JSMR.Application.Scanning;
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using JSMR.Application.Common;
|
||||
using JSMR.Application.Enums;
|
||||
using JSMR.Domain.Enums;
|
||||
|
||||
namespace JSMR.Application.VoiceWorks.Queries.Search;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using JSMR.Application.Common;
|
||||
using JSMR.Domain.Enums;
|
||||
|
||||
namespace JSMR.Application.VoiceWorks.Queries.Search;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user