namespace TravelAgencyWinForms.Models;

public enum FieldKind
{
    Text,
    Integer,
    Decimal,
    Date,
    Boolean,
    Lookup,
    Enum,
    Password
}

public sealed class FieldConfig
{
    public string Name { get; init; } = string.Empty;
    public string Label { get; init; } = string.Empty;
    public FieldKind Kind { get; init; } = FieldKind.Text;
    public bool Required { get; init; }
    public bool IsKey { get; init; }
    public bool AutoIdentity { get; init; }
    public bool ShowInGrid { get; init; } = true;
    public bool ReadOnlyOnEdit { get; init; }
    public string? LookupSql { get; init; }
    public string LookupValueColumn { get; init; } = "id";
    public string LookupDisplayColumn { get; init; } = "name";
    public string[] Options { get; init; } = Array.Empty<string>();
}
