Files

29 lines
1.5 KiB
Python
Raw Permalink Normal View History

2026-08-02 14:07:04 +08:00
from django.db import models
from uuid6 import uuid8
from wechat_数据库.用户数据库.小程序登陆用户 import models_app_name
from wechat_数据库.雪花算法.雪花算法工具 import generator
class weiuser地图定位(models.Model):
"""城市信息表"""
objects = models.Manager() #
idKey = models.UUIDField(primary_key=True, default=uuid8)
id_str = models.CharField(max_length=128, default=generator.generate_str)
map用户uniond = models.CharField(max_length=128, )
map用户openid = models.CharField(max_length=128, )
map经度longitude = models.DecimalField(max_digits=10, decimal_places=6, blank=True, null=True, )
map纬度latitude = models.DecimalField(max_digits=10, decimal_places=6, blank=True, null=True, )
map省 = models.CharField(max_length=128, blank=True, null=True, )
map市 = models.CharField(max_length=128, blank=True, null=True, )
map区 = models.CharField(max_length=128, blank=True, null=True, )
map街道 = models.CharField(max_length=128, blank=True, null=True, )
map街道号码 = models.CharField(max_length=128, blank=True, null=True, )
dateAndTime = models.DateTimeField(auto_now_add=True, db_comment="创建时间") # 数据创建时间
updateTime = models.DateTimeField(auto_now=True, db_comment="更新时间") # 更新时间(需要用 save() )
class Meta:
db_table = "weiuser地图定位" # 给数据表自定义一个名称;默认的会是在 应用名+类名
app_label = models_app_name
ordering = ["dateAndTime", "updateTime"]