Innovenergy_trunk/csharp/App/Backend/Model/TreeNode.cs

21 lines
593 B
C#

using SQLite;
namespace Innovenergy.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; }
}