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

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import java.util.Set;

/**
 * @author Gqr
 * @since 2024/7/3 11:58
 */
@Schema(description = "管理后台 - 报表模板信息新增/修改 Request VO")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class ReportTemplateSaveReqVO  {

    @Schema(description = "主键", example = "1")
    private Long id;

    @Schema(description = "模板名称", example = "订单模板")
    @NotBlank(message = "report.template.save.name.notBlank")
    @Length(min = 1, max = 30, message = "report.template.save.name.length")
    private String name;

    @Schema(description = "报表模板")
    private String content;

    @Schema(description = "备注", example = "该模板仅供生产使用")
    @Length(max = 64, message = "report.template.save.remark.size")
    private String remark;

    @Schema(description = "数据源id列表")
    @Size(max = 30, message = "report.template.save.datasourceIds.size")
    private Set<Long> datasourceIds;

    @Schema(description = "数据集id列表")
    @Size(max = 30, message = "report.template.save.datasetIds.size")
    private Set<Long> datasetIds;

    @Schema(description = "组织id", example = "1")
    private Long organId;
}
