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

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;

/**
 * 仓库组DTO
 *
 * @author QQchen
 * @version 1.0
 */
@Data
@Schema(description = "仓库组DTO")
@EqualsAndHashCode(callSuper = true)
public class RepositoryGroupDTO extends BaseDTO {
    
    @Schema(description = "外部系统ID")
    @NotNull(message = "外部系统ID不能为空")
    private Long externalSystemId;
    
    @Schema(description = "外部系统中的组ID")
    @NotNull(message = "组ID不能为空")
    private Long groupId;
    
    @Schema(description = "仓库组名称")
    @NotBlank(message = "仓库组名称不能为空")
    private String name;
    
    @Schema(description = "仓库组路径")
    @NotBlank(message = "仓库组路径不能为空")
    private String path;
    
    @Schema(description = "仓库组描述")
    private String description;
    
    @Schema(description = "可见性：private-私有，internal-内部，public-公开")
    private String visibility;
    
    @Schema(description = "父级仓库组ID")
    private Long parentId;
    
    @Schema(description = "网页URL")
    private String webUrl;
    
    @Schema(description = "头像URL")
    private String avatarUrl;
    
    @Schema(description = "是否启用")
    private Boolean enabled = true;
    
    @Schema(description = "排序号")
    private Integer sort = 0;
} 