namespace WmsLite.Api.Models.Templates; /// /// 模板 configJson 中单项字段(已通过结构校验)。 /// public sealed class TemplateFieldConfig { public string Field { get; init; } = string.Empty; public string Label { get; init; } = string.Empty; /// 规范化小写:text, number, decimal, int, bool, date, datetime public string Type { get; init; } = "text"; public bool Required { get; init; } public bool Queryable { get; init; } public string? QueryMode { get; init; } public object? DefaultValue { get; init; } /// 与历史逻辑一致:可查询或显式配置了 queryMode 即可作为搜索条件。 public bool AllowQuery => Queryable || !string.IsNullOrWhiteSpace(QueryMode); }