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;

import java.time.LocalDateTime;

/**
 * 仓库项目DTO
 *
 * @author QQchen
 * @version 1.0
 */
@Data
@Schema(description = "仓库项目DTO")
@EqualsAndHashCode(callSuper = true)
public class RepositoryProjectDTO extends BaseDTO {
    
    @Schema(description = "外部系统ID")
    @NotNull(message = "外部系统ID不能为空")
    private Long externalSystemId;
    
    @Schema(description = "外部系统中的项目ID")
    @NotNull(message = "项目ID不能为空")
    private Long projectId;
    
    @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 groupId;
    
    @Schema(description = "默认分支")
    private String defaultBranch;
    
    @Schema(description = "网页URL")
    private String webUrl;
    
    @Schema(description = "SSH克隆地址")
    private String sshUrl;
    
    @Schema(description = "HTTP克隆地址")
    private String httpUrl;
    
    @Schema(description = "最后活动时间")
    private LocalDateTime lastActivityAt;
    
    @Schema(description = "是否启用")
    private Boolean enabled = true;
    
    @Schema(description = "排序号")
    private Integer sort = 0;
} 