using System.Collections.Generic; using Kyoo.Common.Models.Attributes; using Kyoo.Controllers; using Kyoo.Models.Attributes; namespace Kyoo.Models { /// /// This class contains metadata about . /// You can have providers even if you don't have the corresponding . /// public class Provider : IResource { /// public int ID { get; set; } /// public string Slug { get; set; } /// /// The name of this provider. /// public string Name { get; set; } /// /// The path of this provider's logo. /// By default, the http path for this logo is returned from the public API. /// This can be disabled using the internal query flag. /// [SerializeAs("{HOST}/api/providers/{Slug}/logo")] public string Logo { get; set; } /// /// The extension of the logo. This is used for http responses. /// [SerializeIgnore] public string LogoExtension { get; set; } /// /// The list of libraries that uses this provider. /// [LoadableRelation] public ICollection Libraries { get; set; } #if ENABLE_INTERNAL_LINKS /// /// The internal link between this provider and libraries in the list. /// [Link] public ICollection> LibraryLinks { get; set; } /// /// The internal link between this provider and related . /// [Link] public ICollection MetadataLinks { get; set; } #endif /// /// Create a new, default, /// public Provider() { } /// /// Create a new and specify it's . /// The is automatically calculated from it's name. /// /// The name of this provider. /// The logo of this provider. public Provider(string name, string logo) { Slug = Utility.ToSlug(name); Name = name; Logo = logo; } } }