60 lines
1.5 KiB
C#
60 lines
1.5 KiB
C#
namespace SessionZero.Shared.Models;
|
|
|
|
public class SzObject
|
|
{
|
|
public required string Id { get; set; }
|
|
public required string Name { get; set; }
|
|
public required string SzType { get; set; }
|
|
public string Description { get; set; } = string.Empty;
|
|
public string Icon { get; set; } = string.Empty;
|
|
public required string Version { get; set; }
|
|
public required string SchemaVersion { get; set; }
|
|
}
|
|
|
|
public class Section
|
|
{
|
|
public required string Id { get; set; }
|
|
public required string Name { get; set; }
|
|
public required List<Group> Groups { get; set; } = new();
|
|
}
|
|
|
|
public class Group
|
|
{
|
|
public required string Id { get; set; }
|
|
public required string Name { get; set; }
|
|
public required List<FieldDefinition> Fields { get; set; } = new();
|
|
}
|
|
|
|
public class FieldDefinition
|
|
{
|
|
public required string Id { get; set; }
|
|
public required string Name { get; set; }
|
|
public required FieldType Type { get; set; }
|
|
public object? DefaultValue { get; set; }
|
|
public DatasetLink? DatasetLink { get; set; }
|
|
}
|
|
|
|
public class FieldValue
|
|
{
|
|
public required FieldType Type { get; set; }
|
|
public required object Value { get; set; }
|
|
}
|
|
|
|
public class DatasetLink
|
|
{
|
|
/* TODO:
|
|
* This needs to be able to either link a list of specific dataset ids OR
|
|
* a list of allowed dataset types that could be any dataset that the pack has listed as a dependency
|
|
* (This is used on fields that are of type 'List')
|
|
*/
|
|
}
|
|
|
|
public enum FieldType
|
|
{
|
|
Text,
|
|
MultiText,
|
|
Number,
|
|
Boolean,
|
|
Formula,
|
|
List
|
|
} |