mirror of
https://github.com/C9Glax/tranga.git
synced 2025-07-01 08:24:17 +02:00
18 lines
552 B
C#
18 lines
552 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace API.Schema;
|
|
|
|
[PrimaryKey("Key")]
|
|
public class Link(string linkProvider, string linkUrl) : Identifiable(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;
|
|
|
|
public override string ToString() => $"{base.ToString()} {LinkProvider} {LinkUrl}";
|
|
} |