using Newtonsoft.Json; using VoidCat.Model.Paywall; namespace VoidCat.Model { public abstract record VoidFile where TMeta : VoidFileMeta { /// /// Id of the file /// [JsonConverter(typeof(Base58GuidConverter))] public Guid Id { get; init; } /// /// Metadta related to the file /// public TMeta? Metadata { get; init; } /// /// Optional paywall config /// public PaywallConfig? Paywall { get; init; } /// /// User profile that uploaded the file /// public PublicVoidUser? Uploader { get; init; } /// /// Traffic stats for this file /// public Bandwidth? Bandwidth { get; init; } /// /// Virus scanner results /// public VirusScanResult? VirusScan { get; init; } } public sealed record PublicVoidFile : VoidFile { } public sealed record PrivateVoidFile : VoidFile { } }