Files
sixGuoDjango/wechat_数据库/微信支付券/代金券数据库.py
T

32 lines
1.7 KiB
Python
Raw Normal View History

2026-08-10 19:33:59 +08:00
from django.db import models
from uuid6 import uuid8
from wechat_数据库.用户数据库.小程序登陆用户 import models_app_name
class stock券数据表(models.Model):
"""城市信息表"""
objects = models.Manager() #
stock_id = models.UUIDField(primary_key=True, default=uuid8)
stock_商家侧订单号 = models.CharField(max_length=128, )
stock_use_券状态 = models.CharField(max_length=128, null=True, blank=True, )
stock_use_发券时间 = models.DateTimeField(null=True, blank=True, )
stock_use_领券时间 = models.DateTimeField(null=True, blank=True, )
mini_openid = models.CharField(max_length=128, null=True, blank=True, )
mini_unionid = models.CharField(max_length=128, null=True, blank=True, )
stock_归属商户号 = models.CharField(max_length=128)
stock_批次号 = models.CharField(max_length=128, null=True, blank=True, )
stock_批次名称 = models.CharField(max_length=128, null=True, blank=True, )
stock_券金额 = models.IntegerField(null=True, blank=True, )
stock_券门槛 = models.CharField(max_length=128, null=True, blank=True, )
stock_券有效期开始时间 = models.DateField(null=True, blank=True, )
stock_未领取券的数据 = models.JSONField(default=dict, null=True, blank=True, )
stock_券有效期结束时间 = models.DateField(null=True, blank=True, )
dateAndTime = models.DateTimeField(auto_now_add=True, db_comment="创建时间") # 数据创建时间
updateTime = models.DateTimeField(auto_now=True, db_comment="更新时间") # 更新时间(需要用 save() )
class Meta:
db_table = "stock券数据表" # 给数据表自定义一个名称;默认的会是在 应用名+类名
app_label = models_app_name