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

import com.qqchen.deploy.backend.deploy.enums.DevelopmentLanguageTypeEnum;
import com.qqchen.deploy.backend.framework.dto.BaseDTO;
import com.qqchen.deploy.backend.system.model.ExternalSystemDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = true)
public class ApplicationDTO extends BaseDTO {

    @NotBlank(message = "应用编码不能为空")
    private String appCode;

    @NotBlank(message = "应用名称不能为空")
    private String appName;

    private String appDesc;

    @NotNull(message = "开发语言")
    private DevelopmentLanguageTypeEnum language;

    @NotNull(message = "三方系统ID不能为空")
    private Long externalSystemId;

    @NotNull(message = "代码仓库组ID不能为空")
    private Long repoGroupId;

    @NotNull(message = "代码仓库项目ID不能为空")
    private Long repoProjectId;

    @NotNull(message = "所属项目组ID不能为空")
    private Long projectGroupId;

    @Schema(description = "是否启用")
    private Boolean enabled;

    @NotNull(message = "排序号不能为空")
    private Integer sort;

    private ExternalSystemDTO externalSystem;

    private RepositoryGroupDTO repositoryGroup;

    private RepositoryProjectDTO repositoryProject;

    private ProjectGroupDTO projectGroup;

}