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

18 lines
513 B
C#
Raw Normal View History

2023-02-16 12:57:06 +00:00
using SQLite;
namespace Backend.Model;
public abstract 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;
}