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

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;

/**
 * 用户可部署团队环境DTO
 *
 * @author qqchen
 * @since 2025-11-06
 */
@Data
@Schema(description = "用户可部署团队环境信息")
public class UserDeployableTeamEnvironmentDTO {

    @Schema(description = "环境ID")
    private Long environmentId;

    @Schema(description = "环境编码")
    private String environmentCode;

    @Schema(description = "环境名称")
    private String environmentName;

    @Schema(description = "环境描述")
    private String environmentDesc;

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

    @Schema(description = "排序号")
    private Integer sort;

    @Schema(description = "是否需要审批")
    private Boolean requiresApproval;

    @Schema(description = "审批人列表")
    private List<UserDeployableTeamEnvironmentApproverDTO> approvers;

    @Schema(description = "通知配置")
    private UserTeamEnvironmentNotificationConfigDTO notificationConfig;

    @Schema(description = "是否要求代码审查")
    private Boolean requireCodeReview;

    @Schema(description = "可部署应用列表")
    private List<UserDeployableTeamEnvironmentApplicationDTO> applications;

    // ==================== 当前用户权限 ====================

    @Schema(description = "当前用户是否可以发起部署")
    private Boolean canDeploy;

    @Schema(description = "当前用户是否可以审批部署")
    private Boolean canApprove;
}

