mirror of
https://github.com/C9Glax/tranga.git
synced 2025-06-18 09:17:52 +02:00
Add API
This commit is contained in:
17
API/Schema/Link.cs
Normal file
17
API/Schema/Link.cs
Normal 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; }
|
||||
}
|
Reference in New Issue
Block a user