package com.erp.dataimport.dto;

import lombok.Data;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import lombok.Builder;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 导入模板DTO
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ImportTemplateDTO {

    private Long id;

    private String templateName;

    private String templateCode;

    private String bizType;

    private String bizTypeLabel;

    private String description;

    private String filePath;

    private List<ColumnDefinition> columns;

    private Boolean isDefault;

    private Long creatorId;

    private String creatorName;

    private LocalDateTime createdAt;

    private LocalDateTime updatedAt;

    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class ColumnDefinition {
        private String fieldName;
        private String headerName;
        private String dataType;
        private Boolean required;
        private String defaultValue;
        private String validationRule;
        private Integer maxLength;
    }
}
