refactor expression caching; add document fields

This commit is contained in:
Gary Sharp
2023-04-16 14:02:35 +10:00
parent d75663a219
commit cfe4c4b912
15 changed files with 182 additions and 144 deletions
+2
View File
@@ -68,6 +68,8 @@
<Compile Include="Services\Devices\Exporting\DeviceExportFieldMetadata.cs" />
<Compile Include="Services\Devices\Importing\IDeviceImportColumn.cs" />
<Compile Include="Services\Devices\Importing\IDeviceImportDataReader.cs" />
<Compile Include="Services\Documents\DocumentField.cs" />
<Compile Include="Services\Documents\DocumentFieldType.cs" />
<Compile Include="Services\Documents\DocumentTemplatePackage.cs" />
<Compile Include="Services\Documents\OnImportUserFlagRule.cs" />
<Compile Include="Services\Jobs\LocationModes.cs" />
@@ -0,0 +1,28 @@
using System.Collections.Generic;
namespace Disco.Models.Services.Documents
{
public class DocumentField
{
public string Name { get; }
public string Value { get; }
public int Ordinal { get; }
public DocumentFieldType Type { get; }
public bool IsRequired { get; }
public bool IsReadOnly { get; }
public List<string> FixedValues { get; }
public DocumentField(string name, string value, int ordinal, DocumentFieldType type, bool isRequired, bool isReadOnly, List<string> fixedValues)
{
Name = name;
Value = value;
Ordinal = ordinal;
Type = type;
IsRequired = isRequired;
IsReadOnly = isReadOnly;
FixedValues = fixedValues;
}
}
}
@@ -0,0 +1,14 @@
namespace Disco.Models.Services.Documents
{
public enum DocumentFieldType
{
None = 0,
PushButton = 1,
Checkbox = 2,
RadioButton = 3,
Text = 4,
List = 5,
Combo = 6,
Signature = 7,
}
}