Collection Rework (#2830)
This commit is contained in:
parent
0dacc061f1
commit
deaaccb96a
93 changed files with 5413 additions and 1120 deletions
39
API/DTOs/Collection/AppUserCollectionDto.cs
Normal file
39
API/DTOs/Collection/AppUserCollectionDto.cs
Normal file
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using API.Entities.Enums;
|
||||
using API.Services.Plus;
|
||||
|
||||
namespace API.DTOs.Collection;
|
||||
#nullable enable
|
||||
|
||||
public class AppUserCollectionDto
|
||||
{
|
||||
public int Id { get; init; }
|
||||
public string Title { get; set; } = default!;
|
||||
public string Summary { get; set; } = default!;
|
||||
public bool Promoted { get; set; }
|
||||
public AgeRating AgeRating { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// This is used to tell the UI if it should request a Cover Image or not. If null or empty, it has not been set.
|
||||
/// </summary>
|
||||
public string? CoverImage { get; set; } = string.Empty;
|
||||
public bool CoverImageLocked { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Owner of the Collection
|
||||
/// </summary>
|
||||
public string? Owner { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Last time Kavita Synced the Collection with an upstream source (for non Kavita sourced collections)
|
||||
/// </summary>
|
||||
public DateTime LastSyncUtc { get; set; }
|
||||
/// <summary>
|
||||
/// Who created/manages the list. Non-Kavita lists are not editable by the user, except to promote
|
||||
/// </summary>
|
||||
public ScrobbleProvider Source { get; set; } = ScrobbleProvider.Kavita;
|
||||
/// <summary>
|
||||
/// For Non-Kavita sourced collections, the url to sync from
|
||||
/// </summary>
|
||||
public string? SourceUrl { get; set; }
|
||||
}
|
8
API/DTOs/Collection/DeleteCollectionsDto.cs
Normal file
8
API/DTOs/Collection/DeleteCollectionsDto.cs
Normal file
|
@ -0,0 +1,8 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace API.DTOs.Collection;
|
||||
|
||||
public class DeleteCollectionsDto
|
||||
{
|
||||
public IList<int> CollectionIds { get; set; }
|
||||
}
|
9
API/DTOs/Collection/PromoteCollectionsDto.cs
Normal file
9
API/DTOs/Collection/PromoteCollectionsDto.cs
Normal file
|
@ -0,0 +1,9 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace API.DTOs.Collection;
|
||||
|
||||
public class PromoteCollectionsDto
|
||||
{
|
||||
public IList<int> CollectionIds { get; init; }
|
||||
public bool Promoted { get; init; }
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
|
||||
namespace API.DTOs.ReadingLists;
|
||||
#nullable enable
|
||||
|
||||
public class ReadingListDto
|
||||
{
|
||||
|
@ -15,7 +16,7 @@ public class ReadingListDto
|
|||
/// <summary>
|
||||
/// This is used to tell the UI if it should request a Cover Image or not. If null or empty, it has not been set.
|
||||
/// </summary>
|
||||
public string CoverImage { get; set; } = string.Empty;
|
||||
public string? CoverImage { get; set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// Minimum Year the Reading List starts
|
||||
/// </summary>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using System.Collections.Generic;
|
||||
using API.DTOs.Collection;
|
||||
using API.DTOs.CollectionTags;
|
||||
using API.DTOs.Metadata;
|
||||
using API.DTOs.Reader;
|
||||
|
@ -13,7 +14,7 @@ public class SearchResultGroupDto
|
|||
{
|
||||
public IEnumerable<LibraryDto> Libraries { get; set; } = default!;
|
||||
public IEnumerable<SearchResultDto> Series { get; set; } = default!;
|
||||
public IEnumerable<CollectionTagDto> Collections { get; set; } = default!;
|
||||
public IEnumerable<AppUserCollectionDto> Collections { get; set; } = default!;
|
||||
public IEnumerable<ReadingListDto> ReadingLists { get; set; } = default!;
|
||||
public IEnumerable<PersonDto> Persons { get; set; } = default!;
|
||||
public IEnumerable<GenreTagDto> Genres { get; set; } = default!;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
using System.Collections.Generic;
|
||||
using API.DTOs.CollectionTags;
|
||||
using API.DTOs.Metadata;
|
||||
using API.Entities.Enums;
|
||||
|
||||
|
@ -10,11 +9,6 @@ public class SeriesMetadataDto
|
|||
public int Id { get; set; }
|
||||
public string Summary { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Collections the Series belongs to
|
||||
/// </summary>
|
||||
public ICollection<CollectionTagDto> CollectionTags { get; set; } = new List<CollectionTagDto>();
|
||||
|
||||
/// <summary>
|
||||
/// Genres for the Series
|
||||
/// </summary>
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using API.DTOs.CollectionTags;
|
||||
|
||||
namespace API.DTOs;
|
||||
namespace API.DTOs;
|
||||
|
||||
public class UpdateSeriesMetadataDto
|
||||
{
|
||||
public SeriesMetadataDto SeriesMetadata { get; set; } = default!;
|
||||
public ICollection<CollectionTagDto> CollectionTags { get; set; } = default!;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue