mirror of
https://github.com/C9Glax/tranga.git
synced 2025-05-21 13:43:01 +02:00
23 lines
594 B
C#
23 lines
594 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace API.Schema;
|
|
|
|
[PrimaryKey("AltTitleId")]
|
|
public class MangaAltTitle(string language, string title)
|
|
{
|
|
[StringLength(64)]
|
|
[Required]
|
|
public string AltTitleId { get; init; } = TokenGen.CreateToken("AltTitle");
|
|
[StringLength(8)]
|
|
[Required]
|
|
public string Language { get; init; } = language;
|
|
[StringLength(256)]
|
|
[Required]
|
|
public string Title { get; set; } = title;
|
|
|
|
public override string ToString()
|
|
{
|
|
return $"{AltTitleId} {Language} {Title}";
|
|
}
|
|
} |