mirror of
https://github.com/Dadechin/Dashboard-XRoom.git
synced 2025-07-03 00:34:34 +00:00
24 lines
702 B
Python
24 lines
702 B
Python
from django.db import models
|
|
from django.conf import settings
|
|
|
|
|
|
|
|
class Subscription(models.Model):
|
|
# uid = models.UUIDField(default=uuid.uuid4, editable=False, unique=True)
|
|
user = models.ForeignKey(settings.AUTH_USER_MODEL, blank=True, on_delete=models.CASCADE)
|
|
|
|
license_number = models.CharField(max_length=100)
|
|
user_count = models.PositiveIntegerField(default = 0,blank=True) # changed from license_number CharField
|
|
|
|
startTime = models.DateTimeField()
|
|
endTime = models.DateTimeField()
|
|
price = models.DecimalField(max_digits=30, decimal_places=2)
|
|
|
|
def __str__(self):
|
|
return f"Subscription {self.user_count} - License: {self.license_number}"
|
|
|
|
|
|
|
|
|
|
|
|
|