package com.cf.imes.module.report.controller.admin.dataset.vo;

import com.cf.imes.module.report.validation.datasource.SqlParamInjectionValid;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import jakarta.validation.constraints.NotBlank;
import java.io.Serial;
import java.io.Serializable;

/**
 * @author Gqr
 * @since 2024/7/8 11:36
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ReportDatasetParameterVO implements Serializable {
    @Serial
    private static final long serialVersionUID = 2752387952196201725L;
    /**
     * 参数名称
     */
    @Schema(description = "参数名称")
    @NotBlank(message = "report.dataset.save.param.name.notBlank")
    private String name;

    /**
     * 类型
     */
    @Schema(description = "参数类型")
    @NotBlank(message = "report.dataset.save.param.type.notBlank")
    private String type;

    /**
     * 默认值
     */
    @Schema(description = "参数默认值")
    @SqlParamInjectionValid
    private String defaultValue;
}
