mirror of
https://github.com/C9Glax/tranga.git
synced 2025-07-03 01:14:17 +02:00
21 lines
380 B
C#
21 lines
380 B
C#
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace API.Schema;
|
|
|
|
[PrimaryKey("Key")]
|
|
public abstract class Identifiable
|
|
{
|
|
public Identifiable()
|
|
{
|
|
this.Key = TokenGen.CreateToken(this.GetType());
|
|
}
|
|
|
|
public Identifiable(string key)
|
|
{
|
|
this.Key = key;
|
|
}
|
|
|
|
public string Key { get; init; }
|
|
|
|
public override string ToString() => Key;
|
|
} |