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

import com.qqchen.deploy.backend.deploy.entity.ProjectGroup;
import com.qqchen.deploy.backend.deploy.enums.DevelopmentLanguageTypeEnum;
import com.qqchen.deploy.backend.framework.dto.BaseDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.persistence.Column;
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;

    @NotBlank(message = "仓库URL不能为空")
    private String repoUrl;

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

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

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

    private Long projectGroupId;

    private ProjectGroupDTO projectGroup;

}