Innovenergy_trunk/csharp/app/API/DataModel/Data.cs

29 lines
713 B
C#
Raw Normal View History

2023-02-16 12:57:06 +00:00
namespace InnovEnergy.API.DataModel;
public partial record Data
{
public Edit Edit { get; set; }
public Folder Root { get; set; } = null!;
public Data(Folder root, Edit edit)
{
Root = root;
Edit = edit;
}
public static Data Origin
{
get
{
var root = new Folder { Name = "All Installations" };
var admin = new User { Name = "admin", UserType = UserType.Admin };
root.Add(admin);
return new Data(root, new Edit("ORIGIN", admin.Name, 0));
}
}
// https://vrmapi.victronenergy.com/v2/users/55450/addsite
// {"installation_identifier":"ertertertertertert","description":"___TEST"}
}