package com.qqchen.deploy.backend.deploy.integration.response;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

/**
 * Git项目响应对象
 */
@Data
public class GitProjectResponse {

    private Long id;

    private String name;

    private String path;

    private String description;

    private String visibility;

    @JsonProperty("default_branch")
    private String defaultBranch;

    @JsonProperty("web_url")
    private String webUrl;

    @JsonProperty("ssh_url_to_repo")
    private String sshUrlToRepo;

    @JsonProperty("http_url_to_repo")
    private String httpUrlToRepo;

    @JsonProperty("last_activity_at")
    private LocalDateTime lastActivityAt;

    @JsonProperty("name_with_namespace")
    private String nameWithNamespace;

    @JsonProperty("path_with_namespace")
    private String pathWithNamespace;

    @JsonProperty("created_at")
    private LocalDateTime createdAt;

    @JsonProperty("tag_list")
    private List<String> tagList;

    @JsonProperty("readme_url")
    private String readmeUrl;

    @JsonProperty("avatar_url")
    private String avatarUrl;

    @JsonProperty("forks_count")
    private Integer forksCount;

    @JsonProperty("star_count")
    private Integer starCount;

    @JsonProperty("packages_enabled")
    private Boolean packagesEnabled;

    @JsonProperty("empty_repo")
    private Boolean emptyRepo;

    @JsonProperty("archived")
    private Boolean archived;

    @JsonProperty("container_registry_enabled")
    private Boolean containerRegistryEnabled;

    @JsonProperty("container_expiration_policy")
    private Map<String, Object> containerExpirationPolicy;

    @JsonProperty("resolve_outdated_diff_discussions")
    private Boolean resolveOutdatedDiffDiscussions;

    private Namespace namespace;

    @JsonProperty("_links")
    private Map<String, String> links;

    @Data
    public static class Namespace {
        private Long id;
        private String name;
        private String path;
        private String kind;
        @JsonProperty("full_path")
        private String fullPath;
        @JsonProperty("parent_id")
        private Long parentId;
        @JsonProperty("avatar_url")
        private String avatarUrl;
        @JsonProperty("web_url")
        private String webUrl;
    }
} 