19 lines
774 B
Python
19 lines
774 B
Python
from django.db import models
|
|||
|
|
from uuid6 import uuid8
|
||
|
|
|
||
|
|
from wechat_数据库.用户数据库.小程序登陆用户 import models_app_name
|
||
|
|
|
||
|
|
|
||
|
|
class wecom素材库(models.Model):
|
||
|
|
"""城市信息表"""
|
||
|
|
objects = models.Manager() #
|
||
|
|
idKeywecom素材库 = models.UUIDField(primary_key=True, default=uuid8)
|
||
|
|
address = models.JSONField()
|
||
|
|
dateAndTime = models.DateTimeField(auto_now_add=True, db_comment="创建时间") # 数据创建时间
|
||
|
|
updateTime = models.DateTimeField(auto_now=True, db_comment="更新时间") # 更新时间(需要用 save() )
|
||
|
|
|
||
|
|
class Meta:
|
||
|
|
db_table = "wecom素材库" # 给数据表自定义一个名称;默认的会是在 应用名+类名
|
||
|
|
app_label = models_app_name
|
||
|
|
ordering = ["-idKeywecom素材库"]
|