Remove choices in model
This commit is contained in:
parent
f45864c786
commit
3d447e08ff
2 changed files with 19 additions and 6 deletions
|
|
@ -0,0 +1,18 @@
|
|||
# Generated by Django 5.2.4 on 2025-08-03 22:14
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('twitch', '0003_alter_notificationsubscription_unique_together_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='dropbenefit',
|
||||
name='distribution_type',
|
||||
field=models.TextField(db_index=True),
|
||||
),
|
||||
]
|
||||
|
|
@ -123,18 +123,13 @@ class DropCampaign(models.Model):
|
|||
class DropBenefit(models.Model):
|
||||
"""Represents a benefit that can be earned from a drop."""
|
||||
|
||||
DISTRIBUTION_TYPES: ClassVar[list[tuple[str, str]]] = [
|
||||
("DIRECT_ENTITLEMENT", "Direct Entitlement"),
|
||||
("CODE", "Code"),
|
||||
]
|
||||
|
||||
id = models.TextField(primary_key=True)
|
||||
name = models.TextField(db_index=True)
|
||||
image_asset_url = models.URLField(max_length=500, blank=True, default="")
|
||||
created_at = models.DateTimeField(db_index=True)
|
||||
entitlement_limit = models.PositiveIntegerField(default=1)
|
||||
is_ios_available = models.BooleanField(default=False)
|
||||
distribution_type = models.TextField(choices=DISTRIBUTION_TYPES, db_index=True)
|
||||
distribution_type = models.TextField(db_index=True)
|
||||
|
||||
# Foreign keys
|
||||
game = models.ForeignKey(Game, on_delete=models.CASCADE, related_name="drop_benefits", db_index=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue