mirror of
https://github.com/C9Glax/tranga.git
synced 2025-09-10 20:08:19 +02:00
WIP
This commit is contained in:
@@ -3,9 +3,19 @@ using Microsoft.EntityFrameworkCore;
|
||||
namespace API.Schema;
|
||||
|
||||
[PrimaryKey("Key")]
|
||||
public abstract class Identifiable(string key)
|
||||
public abstract class Identifiable
|
||||
{
|
||||
public string Key { get; init; } = key;
|
||||
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;
|
||||
}
|
Reference in New Issue
Block a user