django/base/models.py

33 lines
1.2 KiB
Python
Raw Normal View History

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