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:
24
API/Controllers/DTOs/AltTitle.cs
Normal file
24
API/Controllers/DTOs/AltTitle.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace API.Controllers.DTOs;
|
||||
|
||||
/// <summary>
|
||||
/// <see cref="API.Schema.MangaContext.AltTitle"/> DTO
|
||||
/// </summary>
|
||||
public sealed record AltTitle(string Language, string Title)
|
||||
{
|
||||
/// <summary>
|
||||
/// Language of the Title
|
||||
/// </summary>
|
||||
[Required]
|
||||
[Description("Language of the Title")]
|
||||
public string Language { get; init; } = Language;
|
||||
|
||||
/// <summary>
|
||||
/// Title
|
||||
/// </summary>
|
||||
[Required]
|
||||
[Description("Title")]
|
||||
public string Title { get; init; } = Title;
|
||||
}
|
Reference in New Issue
Block a user