InkForge/shared/InkForge.Data/Entities.cs

21 lines
414 B
C#
Raw Permalink Normal View History

2024-02-07 22:16:59 +01:00
namespace InkForge.Data
{
public abstract class ValueEntity<TEntity>
{
public TEntity Value { get; set; } = default!;
}
public abstract class Entity<TEntity, TKey>
: ValueEntity<TEntity>
{
2024-04-05 12:31:34 +02:00
public TKey Id { get; set; } = default!;
2024-02-07 22:16:59 +01:00
}
2024-04-05 12:31:34 +02:00
public abstract class Entity<TSelf, TEntity, TKey>
: Entity<TEntity, TKey>
where TSelf : Entity<TSelf, TEntity, TKey>
2024-02-07 22:16:59 +01:00
{
2024-04-05 12:31:34 +02:00
public TSelf? Parent { get; set; }
2024-02-07 22:16:59 +01:00
}
}