mirror of
https://github.com/C9Glax/tranga.git
synced 2025-06-21 02:25:37 +02:00
Add API
This commit is contained in:
18
API/Schema/MangaAltTitle.cs
Normal file
18
API/Schema/MangaAltTitle.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace API.Schema;
|
||||
|
||||
[PrimaryKey("AltTitleId")]
|
||||
public class MangaAltTitle(string language, string title)
|
||||
{
|
||||
[MaxLength(64)]
|
||||
public string AltTitleId { get; init; } = TokenGen.CreateToken("AltTitle", 64);
|
||||
[MaxLength(8)]
|
||||
public string Language { get; init; } = language;
|
||||
public string Title { get; set; } = title;
|
||||
|
||||
[ForeignKey("MangaId")]
|
||||
public virtual Manga Manga { get; init; }
|
||||
}
|
Reference in New Issue
Block a user