1
0
mirror of https://github.com/C9Glax/tranga.git synced 2025-04-29 11:42:25 +02:00
2025-01-25 12:06:56 +01:00

12 lines
348 B
C#

using System.ComponentModel.DataAnnotations;
using Microsoft.EntityFrameworkCore;
namespace API.Schema;
[PrimaryKey("AuthorId")]
public class Author(string authorName)
{
[MaxLength(64)]
public string AuthorId { get; init; } = TokenGen.CreateToken(typeof(Author), authorName);
public string AuthorName { get; init; } = authorName;
}