class GithubRepoMap(models.Model):
    class IntegrationType(models.TextChoices):
        """
        FULL integration restricts the PRs to process only after the related PR is merged
        PARTIAL check is not restrictive
        """
        FULL = "FULL", "Full"
        PARTIAL = "PARTIAL", "Partial"
    integration = models.ForeignKey(GithubAppInstallation, on_delete=models.PROTECT)
    code_repo = models.ForeignKey(
        GithubRepository, on_delete=models.PROTECT, related_name="code_repos"
    )
    documentation_repo = models.ForeignKey(
        GithubRepository, on_delete=models.PROTECT, related_name="documentation_repos"
    )
    integration_type = models.CharField(max_length=20, choices=IntegrationType.choices)
    created_at = models.DateTimeField(auto_now_add=True)
    class Meta:
        unique_together = ("integration", "code_repo", "documentation_repo")
class GithubRepoMap(models.Model):
    class IntegrationType(models.TextChoices):
        """
        FULL integration restricts the PRs to process only after the related PR is merged
        PARTIAL check is not restrictive
        """
        FULL = "FULL", "Full"
        PARTIAL = "PARTIAL", "Partial"
    integration = models.ForeignKey(GithubAppInstallation, on_delete=models.PROTECT)
    code_repo = models.ForeignKey(
        GithubRepository, on_delete=models.PROTECT, related_name="code_repos"
    )
    documentation_repo = models.ForeignKey(
        GithubRepository, on_delete=models.PROTECT, related_name="documentation_repos"
    )
    integration_type = models.CharField(max_length=20, choices=IntegrationType.choices)
    created_at = models.DateTimeField(auto_now_add=True)
    class Meta:
        unique_together = ("integration", "code_repo", "documentation_repo")