People Aliases and Merging (#3795)

Co-authored-by: Joseph Milazzo <josephmajora@gmail.com>
This commit is contained in:
Fesaa 2025-05-10 00:18:13 +02:00 committed by GitHub
parent cd2a6af6f2
commit 7ce36bfc44
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
67 changed files with 5288 additions and 284 deletions

View file

@ -1,4 +1,6 @@
namespace API.DTOs;
using API.DTOs.Person;
namespace API.DTOs;
/// <summary>
/// Used to browse writers and click in to see their series

View file

@ -1,6 +1,6 @@
using System.Runtime.Serialization;
using System.Collections.Generic;
namespace API.DTOs;
namespace API.DTOs.Person;
#nullable enable
public class PersonDto
@ -13,6 +13,7 @@ public class PersonDto
public string? SecondaryColor { get; set; }
public string? CoverImage { get; set; }
public List<string> Aliases { get; set; } = [];
public string? Description { get; set; }
/// <summary>

View file

@ -0,0 +1,17 @@
using System.ComponentModel.DataAnnotations;
namespace API.DTOs;
public sealed record PersonMergeDto
{
/// <summary>
/// The id of the person being merged into
/// </summary>
[Required]
public int DestId { get; init; }
/// <summary>
/// The id of the person being merged. This person will be removed, and become an alias of <see cref="DestId"/>
/// </summary>
[Required]
public int SrcId { get; init; }
}

View file

@ -1,4 +1,5 @@
using System.ComponentModel.DataAnnotations;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace API.DTOs;
#nullable enable
@ -11,6 +12,7 @@ public sealed record UpdatePersonDto
public bool CoverImageLocked { get; set; }
[Required]
public string Name {get; set;}
public IList<string> Aliases { get; set; } = [];
public string? Description { get; set; }
public int? AniListId { get; set; }