Phase 3
This commit is contained in:
parent
9321f5a370
commit
25c2ce53cd
23 changed files with 1746 additions and 68 deletions
27
backend/WordVersioning.Api/Models/TemplateField.cs
Normal file
27
backend/WordVersioning.Api/Models/TemplateField.cs
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
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"];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue