Skip to content

Commit

Permalink
resolve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
RulaKhaled committed Jan 10, 2025
1 parent 606857e commit b132006
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions shared/django_apps/codecov_auth/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1001,14 +1001,12 @@ def save(self, *args, **kwargs):

class BillingRate(models.TextChoices):
MONTHLY = "monthly"
YEARLY = "yearly"
ANNUALLY = "annually"


class Plans(BaseModel):
tier = models.ForeignKey(
"Tiers", on_delete=models.CASCADE, related_name="plans", db_index=True
)
base_unit_price = models.IntegerField(default=0)
tier = models.ForeignKey("Tiers", on_delete=models.SET_NULL, related_name="plans")
base_unit_price = models.IntegerField(default=0, blank=True)
benefits = ArrayField(models.TextField(), blank=True, default=list)
billing_rate = models.TextField(
choices=BillingRate.choices,
Expand All @@ -1020,11 +1018,7 @@ class Plans(BaseModel):
max_seats = models.IntegerField(null=True, blank=True)
monthly_uploads_limit = models.IntegerField(null=True, blank=True)
paid_plan = models.BooleanField(default=False)
plan_name = models.CharField(max_length=255, unique=True)

class Meta:
db_table = "plans"
app_label = CODECOV_AUTH_APP_LABEL
name = models.CharField(max_length=255, unique=True)

def __str__(self):
return self.plan_name
Expand All @@ -1035,12 +1029,8 @@ class Tiers(BaseModel):
bundle_analysis = models.BooleanField(default=False)
test_analytics = models.BooleanField(default=False)
flaky_test_detection = models.BooleanField(default=False)
patch_coverage = models.BooleanField(default=False)
project_coverage = models.BooleanField(default=False)
private_repo_support = models.BooleanField(default=False)

class Meta:
db_table = "tiers"
app_label = CODECOV_AUTH_APP_LABEL

def __str__(self):
return self.tier_name

0 comments on commit b132006

Please sign in to comment.