Tranga/API/Schema/Author.cs
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;
}