Files
PageManager/PageManager.Api/PageManager.Api/Api/Dtos/AuthorDto.cs
T

34 lines
986 B
C#

namespace PageManager.Api.Api.Dtos;
public class AuthorDto
{
public int Id { get; set; }
public string Name { get; set; } = string.Empty;
public string? Bio { get; set; }
public int? BornYear { get; set; }
public string? ImageUrl { get; set; }
public string? Slug { get; set; }
public string Role { get; set; } = "Author";
}
public class AuthorSummaryDto
{
public int Id { get; set; }
public string Name { get; set; } = string.Empty;
public string? Bio { get; set; }
public int? BornYear { get; set; }
public string? ImageUrl { get; set; }
public int BookCount { get; set; }
}
public class AuthorDetailDto
{
public int Id { get; set; }
public string Name { get; set; } = string.Empty;
public string? Bio { get; set; }
public int? BornYear { get; set; }
public string? ImageUrl { get; set; }
public string? Slug { get; set; }
public BookDto[] Books { get; set; } = [];
}