mirror of
https://github.com/C9Glax/tranga.git
synced 2025-04-14 04:13:18 +02:00
15 lines
405 B
C#
15 lines
405 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace API.Schema;
|
|
|
|
[PrimaryKey("AuthorId")]
|
|
public class Author(string authorName)
|
|
{
|
|
[StringLength(64)]
|
|
[Required]
|
|
public string AuthorId { get; init; } = TokenGen.CreateToken(typeof(Author), authorName);
|
|
[StringLength(128)]
|
|
[Required]
|
|
public string AuthorName { get; init; } = authorName;
|
|
} |