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

import com.qqchen.deploy.backend.deploy.enums.DevelopmentModeEnum;
import com.qqchen.deploy.backend.framework.dto.BaseDTO;
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)
@Schema(description = "团队信息")
public class TeamDTO extends BaseDTO {

    @Schema(description = "团队编码", example = "PLATFORM_TEAM")
    @NotBlank(message = "团队编码不能为空")
    private String teamCode;

    @Schema(description = "团队名称", example = "平台研发团队")
    @NotBlank(message = "团队名称不能为空")
    private String teamName;

    @Schema(description = "团队描述")
    private String description;

    @Schema(description = "团队负责人ID")
    private Long ownerId;

    @Schema(description = "团队负责人姓名")
    private String ownerName;

    @Schema(description = "是否启用")
    @NotNull(message = "启用状态不能为空")
    private Boolean enabled;

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

    @Schema(description = "开发模式", example = "STANDARD")
    @NotNull(message = "开发模式不能为空")
    private DevelopmentModeEnum developmentMode;

    @Schema(description = "是否启用Git同步检测（仅SYNC_MODE模式有效）")
    @NotNull(message = "Git同步检测开关不能为空")
    private Boolean enableGitSyncCheck;

    @Schema(description = "成员数量")
    private Long memberCount;

    @Schema(description = "该团队可访问的环境数量（去重）")
    private Long environmentCount;

    @Schema(description = "该团队的应用配置数量（不去重，同一应用在不同环境算多个）")
    private Long applicationCount;
}

