This commit is contained in:
jamesparkin675 2023-01-25 18:50:01 +00:00
parent 3e40af72c6
commit 5e38f95b91
2 changed files with 16 additions and 14 deletions

Binary file not shown.

View File

@ -3,18 +3,20 @@ from django.db import models
# products/models.py
from django.db import models
class Scoreboard(models.Model):
class Status(models.IntegerChoices):
ACTIVE = 1, "Active"
INACTIVE = 2, "Inactive"
ARCHIVED = 3, "Archived"
name = models.CharField(max_length=255)
category = models.CharField(max_length=255)
price = models.DecimalField(max_digits=10, decimal_places=2)
cost = models.DecimalField(max_digits=10, decimal_places=2)
status = models.PositiveSmallIntegerField(choices=Status.choices)
def __str__(self):
return self.name
class Pegs(models.Model):
#class Scoreboard(models.Model):
# class Status(models.IntegerChoices):
# ACTIVE = 1, "Active"
# INACTIVE = 2, "Inactive"
# ARCHIVED = 3, "Archived"
#
# name = models.CharField(max_length=255)
# category = models.CharField(max_length=255)
# price = models.DecimalField(max_digits=10, decimal_places=2)
# cost = models.DecimalField(max_digits=10, decimal_places=2)
# status = models.PositiveSmallIntegerField(choices=Status.choices)
#
# def __str__(self):
# return self.name