28 lines
1.6 KiB
C#
28 lines
1.6 KiB
C#
using JSMR.Application.Common;
|
|
using JSMR.Application.Integrations.DLSite.Models;
|
|
|
|
namespace JSMR.Application.Scanning.Contracts;
|
|
|
|
public record VoiceWorkIngest(DLSiteWork Work, VoiceWorkDetails? Details)
|
|
{
|
|
public string MakerId { get; init; } = Work.MakerId;
|
|
public string MakerName { get; init; } = Work.Maker;
|
|
public string ProductId { get; init; } = Work.ProductId;
|
|
public string Title { get; init; } = Work.ProductName;
|
|
public string? Description { get; init; } = Work.Description;
|
|
public ICollection<string> Tags { get; init; } = Work.Tags;
|
|
public ICollection<string> Creators { get; init; } = Work.Creators;
|
|
public int WishlistCount { get; init; } = Details?.WishlistCount ?? 0;
|
|
public int Downloads { get; init; } = Math.Max(Work.Downloads, Details?.DownloadCount ?? 0);
|
|
public bool HasTrial { get; init; } = Work.HasTrial || (Details?.HasTrial ?? false);
|
|
public bool HasDLPlay { get; init; } = Details?.HasDLPlay ?? false;
|
|
public byte? StarRating { get; init; } = Work.StarRating;
|
|
public int? Votes { get; init; } = Work.Votes;
|
|
public AgeRating AgeRating { get; init; } = Details?.AgeRating ?? Work.AgeRating;
|
|
public bool HasImage { get; init; } = Work.ImageUrl.Contains("no_img") == false;
|
|
public ICollection<ISupportedLanguage> SupportedLanguages { get; init; } = Details?.SupportedLanguages ?? [];
|
|
public DateOnly? ExpectedDate { get; init; } = Work.ExpectedDate;
|
|
public DateOnly? SalesDate { get; init; } = Work.SalesDate;
|
|
public DateTime? RegistrationDate { get; init; } = Details?.RegistrationDate;
|
|
// TODO: Other properties
|
|
} |