django/base/models.py

30 lines
1.0 KiB
Python

from django.db import models
from users.models import User
# Create your models here.
class VendorsData(models.Model):
vendorid = models.ForeignKey(User, default=None, on_delete=models.CASCADE)
vendorUUID = models.UUIDField()
vendor = models.CharField(max_length=8, unique=True)
vendorSecretKey = models.UUIDField()
vendorCoverAmount = models.IntegerField(default=0)
vendorPaidNotification = models.IntegerField(default=1)
vendorSkipScreen = models.IntegerField(default=0)
vendorPayWindow = models.IntegerField(default=0)
vendorWebName = models.CharField(max_length=250)
vendorWebAddr = models.CharField(max_length=250)
vendorAddDate = models.DateTimeField(auto_now_add=True)
vendorDeleted = models.IntegerField(default=0)
vendorAddDelete = models.DateTimeField(auto_now=True)
vendorIsActive = models.IntegerField(default=1)
def __str__(self):
return self.vendor
class Meta:
verbose_name = "Vendor"
verbose_name_plural = "Vendors"
ordering = ["-id"]