package com.cf.imes.module.report.controller.admin.datasource.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
@Schema(description = "管理后台 - 报表数据源查询参数 Request VO")
public class ReportDatasourceParameterVO implements Serializable {
    @Serial
    private static final long serialVersionUID = 2752387952196201725L;
    /**
     * 参数名称
     */
    @Schema(description = "参数名称")
    @NotBlank(message = "参数名称不能为空")
    private String name;

    /**
     * 类型
     */
    @Schema(description = "参数类型")
    @NotBlank(message = "参数类型不能为空")
    private String type;

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