package com.qqchen.deploy.backend.deploy.dto;

import com.fasterxml.jackson.databind.JsonNode;
import com.qqchen.deploy.backend.deploy.enums.BuildTypeEnum;
import com.qqchen.deploy.backend.deploy.enums.DevelopmentLanguageTypeEnum;
import com.qqchen.deploy.backend.framework.dto.BaseDTO;
import com.qqchen.deploy.backend.workflow.dto.WorkflowDefinitionDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 应用配置DTO
 */
@Data
@Schema(description = "应用配置")
@EqualsAndHashCode(callSuper = true)
public class DeployAppBuildDTO extends BaseDTO {

    @Schema(description = "构建类型")
    @NotNull(message = "构建类型不能为空")
    private BuildTypeEnum buildType;

    @NotNull(message = "应用语言不能为空")
    private DevelopmentLanguageTypeEnum languageType;

    @Schema(description = "表单配置")
    private JsonNode formVariables;

    @Schema(description = "构建配置")
    @NotNull(message = "构建配置不能为空")
    private JsonNode buildVariables;

    @Schema(description = "环境ID")
    @NotNull(message = "环境ID不能为空")
    private Long environmentId;

    @Schema(description = "应用ID")
    @NotNull(message = "应用ID不能为空")
    private Long applicationId;

    @NotNull(message = "已发布的流程定义ID")
    private Long workflowDefinitionId;

}