Tranga/API/Schema/Author.cs

12 lines
348 B
C#
Raw Normal View History

2024-12-14 21:53:29 +01:00
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);
2024-12-14 21:53:29 +01:00
public string AuthorName { get; init; } = authorName;
}