[beers] Finish out the model

This commit is contained in:
2024-10-22 17:47:38 -04:00
parent 0bda3f6fd8
commit 0ec7ed3a18
3 changed files with 88 additions and 7 deletions

View File

@ -10,6 +10,10 @@ from scrobbles.mixins import ScrobblableMixin
BNULL = {"blank": True, "null": True}
class BeerStyle(TimeStampedModel):
description = models.TextField(**BNULL)
class BeerProducer(TimeStampedModel):
description = models.TextField(**BNULL)
location = models.CharField(max_length=255, **BNULL)
@ -24,7 +28,7 @@ class Beer(ScrobblableMixin):
description = models.TextField(**BNULL)
ibu = models.SmallIntegerField(**BNULL)
abv = models.FloatField(**BNULL)
style = models.CharField(max_length=100, **BNULL)
styles = models.ManyToManyField(BeerStyle)
non_alcoholic = models.BooleanField(default=False)
beeradvocate_id = models.CharField(max_length=255, **BNULL)
beeradvocate_score = models.SmallIntegerField(**BNULL)