mirror of
https://github.com/C9Glax/tranga.git
synced 2025-07-01 08:24:17 +02:00
14 lines
410 B
C#
14 lines
410 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace API.Schema;
|
|
|
|
[PrimaryKey("Key")]
|
|
public class Author(string authorName) : Identifiable(TokenGen.CreateToken(typeof(Author), authorName))
|
|
{
|
|
[StringLength(128)]
|
|
[Required]
|
|
public string AuthorName { get; init; } = authorName;
|
|
|
|
public override string ToString() => $"{base.ToString()} {AuthorName}";
|
|
} |