21 lines
597 B
C#
21 lines
597 B
C#
using SQLite;
|
|
|
|
namespace InnovEnergy.App.Backend.Model;
|
|
|
|
public abstract partial class TreeNode
|
|
{
|
|
[PrimaryKey, AutoIncrement]
|
|
public Int64 Id { get; set; }
|
|
public String Name { get; set; } = "";
|
|
public String Information { get; set; } = ""; // unstructured random info
|
|
|
|
[Indexed] // parent/child relation
|
|
public Int64 ParentId { get; set; }
|
|
|
|
[Ignore] // not in DB, can be used in typescript as type discriminator
|
|
public String Type => GetType().Name;
|
|
|
|
[Ignore]
|
|
public IReadOnlyList<TreeNode>? Children { get; set; }
|
|
|
|
} |