package com.atlassian.stash.internal.repository;

import com.atlassian.stash.internal.pull.InternalPullRequest;

import javax.annotation.Nonnull;

/**
 * Available scopes for {@link RepositoryScoped} entities.
 *
 * @since 3.5
 */
public enum RepositoryScope {

    /**
     * The scope for {@link InternalPullRequest pull requests}.
     */
    PULL_REQUEST(InternalPullRequest.class);

    private final String type;

    private RepositoryScope(Class<?> scopeClass) {
        type = scopeClass.getSimpleName();
    }

    /**
     * Retrieves the {@code sta_repository_scoped_id.scope_type} to use for this scope.
     *
     * @return the scope type
     */
    @Nonnull
    public String getType() {
        return type;
    }
}
