using IWS5.Core.Enums;

namespace IWS5.Core.DTO;

public record DocumentTemplateResponseDTO(
    int TemplateId,
    string TemplateName,
    ATTemplateType TemplateTypeId,
    string TemplateTypeName,
    string TemplateDescription,
    int? ConnectionId,
    string? DatabaseName,
    DocumentTemplateFieldListItemDTO[] Fields)
{
    public int TemplateId { get; private set; } = TemplateId;
    public string TemplateName { get; private set; } = TemplateName;
    public ATTemplateType TemplateTypeId { get; private set; } = TemplateTypeId;
    public string TemplateTypeName { get; private set; } = TemplateTypeName;
    public string TemplateDescription { get; private set; } = TemplateDescription;
    public int? ConnectionId { get; private set; } = ConnectionId;
    public string? DatabaseName { get; private set; } = DatabaseName;
    public DocumentTemplateFieldListItemDTO[] Fields { get; private set; } = Fields;
}

public record DocumentTemplateFieldListItemDTO(
    int Id,
    string Name,
    string Description,
    string DataType,
    int Size,
    string DefaultValue,
    bool Display)
{
    public int Id { get; private set; } = Id;
    public string Name { get; private set; } = Name;
    public string Description { get; private set; } = Description;
    public string DataType { get; private set; } = DataType;
    public int Size { get; private set; } = Size;
    public string DefaultValue { get; private set; } = DefaultValue;
    public bool Display { get; private set; } = Display;
}
