This commit is contained in:
2024-12-14 21:53:29 +01:00
parent ec884f888f
commit 1008da7ee8
66 changed files with 6775 additions and 1 deletions

17
API/Schema/Link.cs Normal file
View File

@ -0,0 +1,17 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace API.Schema;
[PrimaryKey("LinkId")]
public class Link(string linkProvider, string linkUrl)
{
[MaxLength(64)]
public string LinkId { get; init; } = TokenGen.CreateToken(typeof(Link), 64);
public string LinkProvider { get; init; } = linkProvider;
public string LinkUrl { get; init; } = linkUrl;
[ForeignKey("MangaId")]
public virtual Manga Manga { get; init; }
}