37 lines
2.4 KiB
Python
37 lines
2.4 KiB
Python
# 企微用户的数据表
|
|||
|
|
from django.db import models
|
||
|
|
|
||
|
|
from wechat_数据库.用户数据库.小程序登陆用户 import models_app_name
|
||
|
|
from wechat_数据库.雪花算法.雪花算法工具 import generator
|
||
|
|
|
||
|
|
defautl_img = (
|
||
|
|
"https://oss.fujugongxiang.com/six/%E7%A6%8F%E8%81%9A%E8%B4%A1%E7%BF%94%E5%B0%8F%E7%A8%8B%E5%BA%8F/home%E9%A1%B5%E9%9D%A2%E4%B8%BB%E5"
|
||
|
|
"%9B%BE/%E5%A4%B4%E5%83%8F.png")
|
||
|
|
|
||
|
|
|
||
|
|
class wecom企微用户(models.Model):
|
||
|
|
"""城市信息表"""
|
||
|
|
objects = models.Manager() #
|
||
|
|
idKeyWecom企微用户 = models.CharField(primary_key=True, default=generator.generate_str, )
|
||
|
|
wecom企微ID = models.CharField(max_length=128, )
|
||
|
|
wecom企微状态State = models.CharField(max_length=128, default="", null=True)
|
||
|
|
wecom对好友打的标签 = models.JSONField(default=list, blank=True, null=True, ) # 'tag_id': [],
|
||
|
|
wecom对好友的备注名称 = models.CharField(max_length=128, ) # 'remark': '胡蝶',
|
||
|
|
wecom对好友的添加时间 = models.BigIntegerField(blank=True, null=True, ) # 时间戳类型
|
||
|
|
wecom对好友的备注信息 = models.CharField(max_length=128, default="")
|
||
|
|
wecom企微对好友添加的手机号码 = models.JSONField(default=list, blank=True, null=True, ) # 'remark_mobiles': [],
|
||
|
|
wecom企微好友添加方式 = models.CharField(max_length=128, ) # 'oper_userid': 'wmj4zANAAAGqQ7gHSPJb3yUw_PW6bXCg'
|
||
|
|
wecom好友UNIONID = models.CharField(max_length=128, ) # 'unionid': 'oy4Jw6Lyfyj1VvgZFodzq9oqJzHE'
|
||
|
|
wecom好友昵称 = models.CharField(max_length=128, ) # 'name': '胡蝶',
|
||
|
|
wecom好友头像 = models.TextField(default="https://hudie.xiao.band/default_avacitve.jpeg") # 'avatar': 'http://wx.qlogo.cn/mmhead/hIz3ylFIYSibsiaymBicSrKXruslWCA0wcu9TNtnXbAeT8WpsthMVJfpj69h9bPHibC1NbFLzgUTnM0/0',
|
||
|
|
wecom好友性别 = models.CharField(max_length=128, )
|
||
|
|
wecom好友的ID = models.CharField(max_length=128, ) # 'external_userid': 'wmj4zANAAAGqQ7gHSPJb3yUw_PW6bXCg',
|
||
|
|
wecom好友关系状态 = 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 = "wecom企微用户" # 给数据表自定义一个名称;默认的会是在 应用名+类名
|
||
|
|
app_label = models_app_name
|
||
|
|
ordering = ["-dateAndTime", "-updateTime"]
|