28 lines
1.1 KiB
C#
28 lines
1.1 KiB
C#
|
|
namespace WordVersioning.Api.Models;
|
||
|
|
|
||
|
|
/// <summary>นิยาม field หนึ่งตัวของ template (FR-9) — Key = content control (SDT) tag ที่ detect ตอน upload</summary>
|
||
|
|
public class TemplateField
|
||
|
|
{
|
||
|
|
public Guid Id { get; set; }
|
||
|
|
|
||
|
|
public Guid TemplateId { get; set; }
|
||
|
|
|
||
|
|
public Template? Template { get; set; }
|
||
|
|
|
||
|
|
/// <summary>= SDT tag — unique ต่อ template ใช้ค่าเดียวกันทั้ง generate/extract/sync</summary>
|
||
|
|
public string Key { get; set; } = string.Empty;
|
||
|
|
|
||
|
|
/// <summary>ชื่อที่แสดงในฟอร์ม (default = Key จนกว่า admin จะตั้ง)</summary>
|
||
|
|
public string Label { get; set; } = string.Empty;
|
||
|
|
|
||
|
|
/// <summary>text | number | date</summary>
|
||
|
|
public string Type { get; set; } = "text";
|
||
|
|
|
||
|
|
public bool IsRequired { get; set; }
|
||
|
|
|
||
|
|
/// <summary>ลำดับตอนแสดงฟอร์ม (default = ลำดับที่ปรากฏในไฟล์ตอน detect)</summary>
|
||
|
|
public int SortOrder { get; set; }
|
||
|
|
|
||
|
|
public static readonly string[] ValidTypes = ["text", "number", "date"];
|
||
|
|
}
|