mirror of
https://github.com/C9Glax/tranga.git
synced 2025-09-10 11:58:19 +02:00
Use DTOs to return API requests instead of Database Schema types.
Make use of IHttpStatusCodeResults
This commit is contained in:
17
API/Controllers/DTOs/Author.cs
Normal file
17
API/Controllers/DTOs/Author.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace API.Controllers.DTOs;
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="API.Schema.MangaContext.Author"/> DTO
|
||||
/// </summary>
|
||||
public record Author(string Key, string Name) : Identifiable(Key)
|
||||
{
|
||||
/// <summary>
|
||||
/// Name of the Author.
|
||||
/// </summary>
|
||||
[Required]
|
||||
[Description("Name of the Author.")]
|
||||
public string Name { get; init; } = Name;
|
||||
}
|
Reference in New Issue
Block a user