WMSlite/WmsLite.Api/Models/Templates/TemplateFieldConfig.cs
zhougf fa1b286463 Add WmsLite monorepo with JWT auth, tenant context, and project READMEs.
Implement API security baseline (sys_user, JWT, audit fields, transactions,
unique constraints) and Web real login with 401 handling. Document setup
and development workflows in root, WmsLite.Api, and WmsLite.Web README files.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-24 14:17:47 +08:00

26 lines
812 B
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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