package com.qqchen.deploy.backend.deploy.entity;

import com.qqchen.deploy.backend.framework.annotation.LogicDelete;
import com.qqchen.deploy.backend.framework.domain.Entity;
import jakarta.persistence.Column;
import jakarta.persistence.Table;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = true)
@jakarta.persistence.Entity
@Table(name = "deploy_repo_project")
@LogicDelete
public class RepositoryProject extends Entity<Long> {

    @Column(nullable = false)
    private String name;

    @Column(nullable = false)
    private String path;

    private String description;

    private String visibility;

    @Column(name = "default_branch")
    private String defaultBranch;

    @Column(name = "web_url")
    private String webUrl;

    @Column(name = "ssh_url")
    private String sshUrl;

    @Column(name = "http_url")
    private String httpUrl;

    @Column(name = "last_activity_at")
    private LocalDateTime lastActivityAt;

    @Column(name = "name_with_namespace")
    private String nameWithNamespace;

    @Column(name = "path_with_namespace")
    private String pathWithNamespace;

    @Column(name = "created_at")
    private LocalDateTime createdAt;

    @Column(name = "external_system_id")
    private Long externalSystemId;

    @Column(name = "repo_group_id")
    private Long repoGroupId;

    @Column(name = "repo_project_id", nullable = false)
    private Long repoProjectId;

}