mirror of
https://github.com/C9Glax/tranga.git
synced 2025-04-13 03:43:17 +02:00
19 lines
531 B
C#
19 lines
531 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace API.Schema;
|
|
|
|
[PrimaryKey("LinkId")]
|
|
public class Link(string linkProvider, string linkUrl)
|
|
{
|
|
[StringLength(64)]
|
|
[Required]
|
|
public string LinkId { get; init; } = TokenGen.CreateToken(typeof(Link), linkProvider, linkUrl);
|
|
[StringLength(64)]
|
|
[Required]
|
|
public string LinkProvider { get; init; } = linkProvider;
|
|
[StringLength(2048)]
|
|
[Required]
|
|
[Url]
|
|
public string LinkUrl { get; init; } = linkUrl;
|
|
} |