django/base/models.py

33 lines
1.2 KiB
Python

from django.db import models
from users.models import User
from django.contrib import admin
# Create your models here.
class VendorsData(models.Model):
id = models.BigAutoField(primary_key=True)
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.BooleanField(default=True)
vendorSkipScreen = models.BooleanField(default=False)
vendorPayWindow = models.BooleanField(default=True)
vendorWebName = models.CharField(max_length=250)
vendorWebAddr = models.URLField(max_length=250)
vendorAddDate = models.DateTimeField(auto_now_add=True)
vendorDeleted = models.BooleanField(default=False)
vendorUpdated = models.DateTimeField(auto_now=True)
vendorAddDelete = models.DateTimeField(auto_now_add=True)
vendorIsActive = models.BooleanField(default=True)
def __str__(self):
return self.vendor
class Meta:
verbose_name = "Vendor"
verbose_name_plural = "Vendors"
ordering = ["-id"]