InkForge/shared/InkForge.Data/Entities.cs
2024-04-05 12:31:34 +02:00

20 lines
414 B
C#

namespace InkForge.Data
{
public abstract class ValueEntity<TEntity>
{
public TEntity Value { get; set; } = default!;
}
public abstract class Entity<TEntity, TKey>
: ValueEntity<TEntity>
{
public TKey Id { get; set; } = default!;
}
public abstract class Entity<TSelf, TEntity, TKey>
: Entity<TEntity, TKey>
where TSelf : Entity<TSelf, TEntity, TKey>
{
public TSelf? Parent { get; set; }
}
}