|
@@ -288,6 +288,10 @@ class Equipment_Info(models.Model):
|
|
|
receiveTime = models.CharField(blank=True, default='', max_length=16, verbose_name=u'接收到报警时间')
|
|
|
userID = models.ForeignKey(Device_User, null=True, blank=True, to_field='userID', on_delete=models.CASCADE)
|
|
|
is_st = models.SmallIntegerField(default=0, verbose_name='是否截图') # 0 否,1 是图,2,视频
|
|
|
+ message_id = models.CharField(max_length=32, default='', verbose_name='第三方推送服务器返回的id')
|
|
|
+ push_type = models.SmallIntegerField(default=0, verbose_name='第三方推送服务器标志。0:APNS推送,1:谷歌推送,2:极光推送')
|
|
|
+ push_server_status = models.IntegerField(default=200, verbose_name='是否成功推送到第三方服务器。200:成功,other:失败')
|
|
|
+ push_device_status = models.SmallIntegerField(default=-1, verbose_name='是否成功推送到目标设备。0:失败,1:成功')
|
|
|
addTime = models.IntegerField(verbose_name='添加时间', default=0)
|
|
|
|
|
|
def __str__(self):
|
|
@@ -351,7 +355,7 @@ class User_Brand(models.Model):
|
|
|
# 关联用户
|
|
|
userID = models.ForeignKey(Device_User, to_field='userID', on_delete=models.CASCADE)
|
|
|
deviceSupplier = models.CharField(max_length=32, default='', verbose_name='(必填)设备供应商 string (例:华为、小米...)')
|
|
|
- deviceModel = models.CharField(max_length=32, default='', verbose_name='(必填)设备型号 string @mock=HM NOTE 1TD')
|
|
|
+ deviceModel = models.CharField(max_length=64, default='', verbose_name='(必填)设备型号 string @mock=HM NOTE 1TD')
|
|
|
osType = models.CharField(max_length=32, default='', verbose_name='(必填)操作系统名称 string @mock=Android')
|
|
|
osVersion = models.CharField(max_length=32, default='', verbose_name='(必填)操作系统版本号 string @mock=4.0')
|
|
|
|
|
@@ -507,6 +511,7 @@ class App_Colophon(models.Model):
|
|
|
|
|
|
class Order_Model(models.Model):
|
|
|
orderID = models.CharField(blank=True, max_length=20, primary_key=True, verbose_name=u'订单id')
|
|
|
+ trade_no = models.CharField(blank=True, max_length=32, default='', verbose_name='第三方订单号')
|
|
|
# 订单关联用户
|
|
|
userID = models.ForeignKey(Device_User, to_field='userID', on_delete=models.CASCADE)
|
|
|
UID = models.CharField(max_length=20, verbose_name='设备UID')
|
|
@@ -517,7 +522,7 @@ class Order_Model(models.Model):
|
|
|
addTime = models.IntegerField(verbose_name='添加时间', default=0)
|
|
|
updTime = models.IntegerField(verbose_name='更新时间', default=0)
|
|
|
endTime = models.IntegerField(verbose_name='结束时间', default=0)
|
|
|
- status = models.SmallIntegerField(default=0, verbose_name='付款状态') # 0:否,1:成功
|
|
|
+ status = models.SmallIntegerField(default=0, verbose_name='付款状态') # 0:待支付,1:成功,2:取消,3:已退款
|
|
|
payType = models.SmallIntegerField(default=0, verbose_name='付款类型0:paypal,1:alipay')
|
|
|
payTime = models.IntegerField(verbose_name='支付成功时间', default=0)
|
|
|
rank = models.ForeignKey(Store_Meal, to_field='id', default='', on_delete=models.CASCADE, verbose_name='套餐类型')
|
|
@@ -759,7 +764,7 @@ class UserExModel(models.Model):
|
|
|
class UserOauth2Model(models.Model):
|
|
|
id = models.AutoField(primary_key=True, verbose_name='自增id')
|
|
|
userID = models.ForeignKey(Device_User, to_field='userID', on_delete=models.CASCADE)
|
|
|
- authType = models.SmallIntegerField(default=0, verbose_name=0) # 授权类型 0 非授权,1 微信授权
|
|
|
+ authType = models.SmallIntegerField(default=0, verbose_name=0) # 授权类型 0 非授权,1 微信授权,2 苹果授权
|
|
|
unionID = models.CharField(default='', max_length=64, verbose_name='唯一标记') # 绑定唯一标记 unionID
|
|
|
addTime = models.IntegerField(verbose_name='添加时间', default=0)
|
|
|
updTime = models.IntegerField(verbose_name='更新时间', default=0)
|
|
@@ -908,3 +913,102 @@ class GrantCodeModel(models.Model):
|
|
|
ordering = ('-add_time',)
|
|
|
verbose_name = u'授权码表'
|
|
|
db_table = 'oauth_grant_code'
|
|
|
+
|
|
|
+
|
|
|
+class UserAppFrequencyModel(models.Model):
|
|
|
+ id = models.AutoField(primary_key=True)
|
|
|
+ user = models.ForeignKey(Device_User, to_field='userID', on_delete=models.CASCADE, verbose_name='关联设备用户表')
|
|
|
+ type = models.SmallIntegerField(default=0, verbose_name='使用频率类型') # 1:每天,2:三天,3:一周,4:两周,5:一个月,6:一个月以上
|
|
|
+ data_time = models.IntegerField(default=0, verbose_name='数据时间')
|
|
|
+ add_time = models.IntegerField(default=0, verbose_name='添加时间')
|
|
|
+ update_time = models.IntegerField(default=0, verbose_name='更新时间')
|
|
|
+
|
|
|
+ class Meta:
|
|
|
+ verbose_name = '用户使用APP频率表'
|
|
|
+ verbose_name_plural = verbose_name
|
|
|
+ db_table = 'user_app_frequency'
|
|
|
+ ordering = ('-add_time',)
|
|
|
+
|
|
|
+
|
|
|
+class AppFrequencyStatisticsModel(models.Model):
|
|
|
+ id = models.AutoField(primary_key=True)
|
|
|
+ data = models.TextField(default='', verbose_name='统计好的数据')
|
|
|
+ month = models.IntegerField(default=0, verbose_name='月份')
|
|
|
+ year = models.IntegerField(default=0, verbose_name='年份')
|
|
|
+
|
|
|
+ class Meta:
|
|
|
+ verbose_name = 'app月使用频率统计表'
|
|
|
+ verbose_name_plural = verbose_name
|
|
|
+ db_table = 'app_frequency_statistics'
|
|
|
+
|
|
|
+
|
|
|
+class AppFrequencyYearStatisticsModel(models.Model):
|
|
|
+ id = models.AutoField(primary_key=True)
|
|
|
+ data = models.TextField(default='', verbose_name='统计好的数据')
|
|
|
+ year = models.IntegerField(default=0, verbose_name='年份')
|
|
|
+ num = models.IntegerField(default=0, verbose_name='总人数')
|
|
|
+
|
|
|
+ class Meta:
|
|
|
+ verbose_name = 'app使用频率统计表,年度统计'
|
|
|
+ verbose_name_plural = verbose_name
|
|
|
+ db_table = 'app_frequency_year_statistics'
|
|
|
+
|
|
|
+# alexa连接数统计表
|
|
|
+class AlexaConnectStatisticsModel(models.Model):
|
|
|
+ id = models.AutoField(primary_key=True)
|
|
|
+ num = models.IntegerField(default=0, verbose_name='总人数')
|
|
|
+ data_time = models.IntegerField(default=0, verbose_name='数据时间')
|
|
|
+
|
|
|
+ class Meta:
|
|
|
+ verbose_name = 'alexa连接数统计表'
|
|
|
+ verbose_name_plural = verbose_name
|
|
|
+ db_table = 'alexa_statistics'
|
|
|
+
|
|
|
+
|
|
|
+class FAQModel(models.Model):
|
|
|
+ id = models.AutoField(primary_key=True)
|
|
|
+ title = models.CharField(max_length=64, default='', unique=True, verbose_name='标题')
|
|
|
+ content = models.TextField(default='', verbose_name='内容')
|
|
|
+ add_time = models.IntegerField(default=0, verbose_name='添加时间')
|
|
|
+ update_time = models.IntegerField(default=0, verbose_name='更新时间')
|
|
|
+
|
|
|
+ class Meta:
|
|
|
+ db_table = 'tb_faq'
|
|
|
+ verbose_name = '问题帮助表'
|
|
|
+ verbose_name_plural = verbose_name
|
|
|
+
|
|
|
+
|
|
|
+class AppLogModel(models.Model):
|
|
|
+ id = models.AutoField(primary_key=True)
|
|
|
+ user = models.ForeignKey(Device_User, to_field='userID', on_delete=models.CASCADE, verbose_name='关联设备用户表')
|
|
|
+ uid = models.CharField(max_length=20, default='', verbose_name='设备uid')
|
|
|
+ average_delay = models.CharField(max_length=32, default='', verbose_name='最高平均延时')
|
|
|
+ status = models.SmallIntegerField(default=0, verbose_name='失败状态')
|
|
|
+ filename = models.CharField(max_length=120, default='', verbose_name='文件名')
|
|
|
+ add_time = models.IntegerField(default=0, verbose_name='日期')
|
|
|
+
|
|
|
+ class Meta:
|
|
|
+ db_table = 'app_log'
|
|
|
+ verbose_name = 'APP日志表'
|
|
|
+ verbose_name_plural = verbose_name
|
|
|
+
|
|
|
+
|
|
|
+class EquipmentInfoExStatisticsModel(models.Model):
|
|
|
+ id = models.AutoField(primary_key=True)
|
|
|
+ push_type = models.SmallIntegerField(default=0, verbose_name='第三方推送服务器标志。0:APNS推送,1:谷歌推送,2:极光推送')
|
|
|
+ number_of_successes = models.IntegerField(default=0, verbose_name='推送成功数量')
|
|
|
+ number_of_failures = models.IntegerField(default=0, verbose_name='推送失败数量')
|
|
|
+ number_of_arrival = models.IntegerField(default=0, verbose_name='推送到达数量')
|
|
|
+ statistics_date = models.IntegerField(default=0, verbose_name='属于哪天、哪月的统计')
|
|
|
+ date_type = models.SmallIntegerField(default=0, verbose_name='统计日期的类型。0:天,1:月')
|
|
|
+ add_time = models.IntegerField(default=0, verbose_name='添加时间')
|
|
|
+
|
|
|
+ class Meta:
|
|
|
+ db_table = 'equipment_info_ex_statistics'
|
|
|
+ verbose_name = '推送消息统计表'
|
|
|
+ verbose_name_plural = verbose_name
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|