|
@@ -1,13 +1,14 @@
|
|
|
from itertools import chain
|
|
|
+
|
|
|
from django.contrib.auth.models import BaseUserManager, AbstractBaseUser
|
|
|
from django.db import models
|
|
|
-from django.utils import six, timezone
|
|
|
+from django.utils import six
|
|
|
+from django.utils import timezone
|
|
|
from django.utils.encoding import python_2_unicode_compatible
|
|
|
from imagekit.models import ProcessedImageField
|
|
|
from imagekit.processors import ResizeToFill
|
|
|
|
|
|
from Ansjer.config import SERVER_DOMAIN
|
|
|
-from django.utils import timezone
|
|
|
|
|
|
|
|
|
class PermissionsManager(models.Manager):
|
|
@@ -78,17 +79,19 @@ class Permissions(models.Model):
|
|
|
def natural_key(self):
|
|
|
return (self.permName)
|
|
|
|
|
|
+
|
|
|
class MenuModel(models.Model):
|
|
|
id = models.AutoField(primary_key=True, verbose_name=u'自增标记ID')
|
|
|
parentId = models.IntegerField(default=0, verbose_name='父节点ID')
|
|
|
- name = models.CharField(max_length=50, null=True, default='', verbose_name='名称') #首字母大写,一定要与vue文件的name对应起来,用于noKeepAlive缓存控制(该项特别重要)
|
|
|
- path = models.CharField(max_length=100, null=True, default='',verbose_name='路径')
|
|
|
- component = models.CharField(max_length=100, null=True, default='', verbose_name='vue文件路径') #所谓的vue 组件
|
|
|
+ name = models.CharField(max_length=50, null=True, default='',
|
|
|
+ verbose_name='名称') # 首字母大写,一定要与vue文件的name对应起来,用于noKeepAlive缓存控制(该项特别重要)
|
|
|
+ path = models.CharField(max_length=100, null=True, default='', verbose_name='路径')
|
|
|
+ component = models.CharField(max_length=100, null=True, default='', verbose_name='vue文件路径') # 所谓的vue 组件
|
|
|
hidden = models.BooleanField(blank=True, default=False, verbose_name=u'是否隐藏')
|
|
|
alwaysShow = models.BooleanField(blank=True, default=False, verbose_name=u'始终显示当前节点')
|
|
|
levelHidden = models.BooleanField(blank=True, default=False, verbose_name=u'是否隐藏一级路由')
|
|
|
- title = models.CharField(max_length=50, default='',verbose_name='标题')
|
|
|
- icon = models.CharField(max_length=50, default='',verbose_name='图标名')
|
|
|
+ title = models.CharField(max_length=50, default='', verbose_name='标题')
|
|
|
+ icon = models.CharField(max_length=50, default='', verbose_name='图标名')
|
|
|
isCustomSvg = models.BooleanField(blank=True, default=False, verbose_name=u'是否是自定义svg图标')
|
|
|
noKeepAlive = models.BooleanField(blank=True, default=False, verbose_name=u'当前路由是否不缓存')
|
|
|
noClosable = models.BooleanField(blank=True, default=False, verbose_name=u'当前路由是否可关闭多标签页')
|
|
@@ -99,7 +102,7 @@ class MenuModel(models.Model):
|
|
|
dynamicNewTab = models.BooleanField(blank=True, default=False, verbose_name=u'动态传参路由是否新开标签页')
|
|
|
redirect = models.CharField(max_length=50, default='', verbose_name='重定向')
|
|
|
menu_code = models.CharField(max_length=100, default='', verbose_name='菜单编码')
|
|
|
- menutype = models.SmallIntegerField(default=1, verbose_name=u'类型') #类型: 1-菜单 2-按钮
|
|
|
+ menutype = models.SmallIntegerField(default=1, verbose_name=u'类型') # 类型: 1-菜单 2-按钮
|
|
|
sort = models.IntegerField(default=0, verbose_name='排序')
|
|
|
|
|
|
class Meta:
|
|
@@ -107,6 +110,7 @@ class MenuModel(models.Model):
|
|
|
verbose_name = u'菜单表'
|
|
|
verbose_name_plural = verbose_name
|
|
|
|
|
|
+
|
|
|
class Role(models.Model):
|
|
|
rid = models.SmallIntegerField(primary_key=True, unique=True, verbose_name=u'用户角色组ID')
|
|
|
roleName = models.CharField(max_length=32, unique=True,
|
|
@@ -148,6 +152,7 @@ class Role(models.Model):
|
|
|
permslist.sort()
|
|
|
return permslist
|
|
|
|
|
|
+
|
|
|
class Device_User(AbstractBaseUser):
|
|
|
userID = models.CharField(blank=True, max_length=32, primary_key=True,
|
|
|
verbose_name=u'用户ID', unique=True)
|
|
@@ -175,10 +180,10 @@ class Device_User(AbstractBaseUser):
|
|
|
language = models.CharField(blank=True, max_length=16, default='en', verbose_name=u'语言地区')
|
|
|
# 手机注册增加字段
|
|
|
phone = models.CharField(max_length=16, db_index=True, verbose_name=u'手机号', default='', blank=True)
|
|
|
- fingerprint_enable = models.SmallIntegerField(default=0, verbose_name=u'是否开启了指纹登录') # 0:未开启,1:已开启
|
|
|
+ fingerprint_enable = models.SmallIntegerField(default=0, verbose_name=u'是否开启了指纹登录') # 0:未开启,1:已开启
|
|
|
fingerprint_key = models.CharField(max_length=128, default='', verbose_name=u'客户端用于解码的密钥等信息')
|
|
|
- is_local = models.BooleanField(blank=True, default=False, verbose_name=u'是否是本地登录用户') # False:账号登录,1:本地登录
|
|
|
- subscribe_email = models.SmallIntegerField(default=0, verbose_name=u'是否订阅营销邮件') # 0:未订阅,1:订阅,2:不订阅
|
|
|
+ is_local = models.BooleanField(blank=True, default=False, verbose_name=u'是否是本地登录用户') # False:账号登录,1:本地登录
|
|
|
+ subscribe_email = models.SmallIntegerField(default=0, verbose_name=u'是否订阅营销邮件') # 0:未订阅,1:订阅,2:不订阅
|
|
|
region_country = models.IntegerField(blank=True, default=0, verbose_name='地区表唯一标识')
|
|
|
objects = UserManager()
|
|
|
|
|
@@ -270,7 +275,7 @@ class Device_Info(models.Model):
|
|
|
iSNotification = models.BooleanField(blank=True, verbose_name=u'报警通知 0:关闭,1:开启)', default=False)
|
|
|
isVod = models.SmallIntegerField(blank=True, default=0, verbose_name='是否支持云存') # 是否支持云存设备
|
|
|
isExist = models.SmallIntegerField(blank=True, default=1, verbose_name='是否被删除') # 是否被删除了(需主用户交互) 1存在,0不存在,2设备被重置
|
|
|
- isCameraOpenCloud = models.SmallIntegerField(blank=True, default=1, verbose_name='是否开启云存') # 0:不开启 1:开启
|
|
|
+ isCameraOpenCloud = models.SmallIntegerField(blank=True, default=1, verbose_name='是否开启云存') # 0:不开启 1:开启
|
|
|
serial_number = models.CharField(blank=True, max_length=9, default='', verbose_name='关联序列号')
|
|
|
###
|
|
|
REQUIRED_FIELDS = []
|
|
@@ -324,7 +329,7 @@ class Equipment_Info(models.Model):
|
|
|
alarm = models.CharField(blank=True, max_length=256, verbose_name=u'报警信息')
|
|
|
eventTime = models.CharField(blank=True, db_index=True, default='', max_length=16, verbose_name=u'设备报警时间')
|
|
|
receiveTime = models.CharField(blank=True, default='', max_length=16, verbose_name=u'接收到报警时间')
|
|
|
- userID_id = models.CharField(default='', db_index=True, blank=True, max_length=32, verbose_name=u'用户ID')
|
|
|
+ userID_id = models.CharField(default='', db_index=True, blank=True, max_length=32, verbose_name=u'用户ID')
|
|
|
is_st = models.SmallIntegerField(default=0, verbose_name='是否截图') # 0 否,1 是图,2,视频
|
|
|
storage_location = models.SmallIntegerField(default=1, verbose_name='数据信息存储位置。1:阿里云oss,2:aws')
|
|
|
borderCoords = models.TextField(default='', blank=True, verbose_name=u'ai类型图片边框位置信息')
|
|
@@ -568,7 +573,7 @@ class Ai_Push_Info(models.Model):
|
|
|
alarm = models.CharField(blank=True, max_length=256, verbose_name=u'报警信息')
|
|
|
eventTime = models.CharField(blank=True, default='', max_length=16, verbose_name=u'设备报警时间')
|
|
|
receiveTime = models.CharField(blank=True, default='', max_length=16, verbose_name=u'接收到报警时间')
|
|
|
- userID_id = models.CharField(default='', db_index=True, blank=True, max_length=32, verbose_name=u'用户ID')
|
|
|
+ userID_id = models.CharField(default='', db_index=True, blank=True, max_length=32, verbose_name=u'用户ID')
|
|
|
is_st = models.SmallIntegerField(default=0, verbose_name='是否截图') # 0 否,1 是图,2,视频
|
|
|
storage_location = models.SmallIntegerField(default=1, db_index=True, verbose_name='数据信息存储位置。1:阿里云oss,2:aws')
|
|
|
# message_id = models.CharField(blank=True, max_length=32, default='', verbose_name='第三方推送服务器返回的id')
|
|
@@ -700,10 +705,10 @@ class Store_Meal(models.Model):
|
|
|
symbol = models.CharField(blank=True, default='$', max_length=32, verbose_name=u'符号')
|
|
|
price = models.CharField(blank=True, max_length=32, verbose_name=u'价格')
|
|
|
virtual_price = models.CharField(blank=True, max_length=32, verbose_name=u'虚拟价格')
|
|
|
- is_discounts = models.SmallIntegerField(default=0, verbose_name=u'该套餐是否有优惠 [0=否,1是]') # 0没有;1有
|
|
|
+ is_discounts = models.SmallIntegerField(default=0, verbose_name=u'该套餐是否有优惠 [0=否,1是]') # 0没有;1有
|
|
|
discount_price = models.CharField(blank=True, max_length=32, verbose_name=u'第二年优惠价格')
|
|
|
- day = models.IntegerField(default=0, blank=True, verbose_name=u'云存录像保存天数(循环)') # 7,30,180,360
|
|
|
- expire = models.IntegerField(default=0, blank=True, verbose_name=u'有效期') #单位月
|
|
|
+ day = models.IntegerField(default=0, blank=True, verbose_name=u'云存录像保存天数(循环)') # 7,30,180,360
|
|
|
+ expire = models.IntegerField(default=0, blank=True, verbose_name=u'有效期') # 单位月
|
|
|
# content = models.TextField(blank=True, null=True, verbose_name=u'描述')
|
|
|
add_time = models.DateTimeField(blank=True, null=True, verbose_name=u'加入时间', auto_now_add=True)
|
|
|
# type = models.SmallIntegerField(default=0, verbose_name='付款类型') # 0是paypal,1为支付宝
|
|
@@ -717,7 +722,7 @@ class Store_Meal(models.Model):
|
|
|
# lang = models.CharField(default='', max_length=20, verbose_name='语言/国家')
|
|
|
lang = models.ManyToManyField(to='Lang', verbose_name='套餐语言', db_table='store_meal_lang')
|
|
|
cycle_config_id = models.IntegerField(null=True, verbose_name='周期付款配置表id')
|
|
|
- sort = models.IntegerField(default=99, blank=True, verbose_name=u'排序,越小越靠前') #单位月
|
|
|
+ sort = models.IntegerField(default=99, blank=True, verbose_name=u'排序,越小越靠前') # 单位月
|
|
|
# 备用字段
|
|
|
spare_3 = models.CharField(default='', blank=True, max_length=64, db_index=True, verbose_name=u'备用字段3')
|
|
|
spare_4 = models.CharField(default='', blank=True, max_length=64, db_index=True, verbose_name=u'备用字段4')
|
|
@@ -731,6 +736,7 @@ class Store_Meal(models.Model):
|
|
|
verbose_name_plural = verbose_name
|
|
|
ordering = ('id',)
|
|
|
|
|
|
+
|
|
|
class AiStoreMeal(models.Model):
|
|
|
id = models.AutoField(primary_key=True, verbose_name=u'自增ID')
|
|
|
price = models.CharField(blank=True, max_length=32, verbose_name=u'价格')
|
|
@@ -738,9 +744,9 @@ class AiStoreMeal(models.Model):
|
|
|
symbol = models.CharField(blank=True, default='$', max_length=32, verbose_name=u'符号')
|
|
|
currency = models.CharField(blank=True, default='$', max_length=32, verbose_name=u'货币符号')
|
|
|
is_show = models.SmallIntegerField(default=0, verbose_name=u'是否显示') # 0: 否, 1: 是
|
|
|
- is_discounts = models.SmallIntegerField(default=0, verbose_name=u'是否有优惠') # 0: 没有, 1: 有
|
|
|
+ is_discounts = models.SmallIntegerField(default=0, verbose_name=u'是否有优惠') # 0: 没有, 1: 有
|
|
|
discount_price = models.CharField(blank=True, max_length=32, verbose_name=u'第二年优惠价格')
|
|
|
- effective_day = models.IntegerField(default=0, blank=True, verbose_name=u'有效天数') # 7, 30
|
|
|
+ effective_day = models.IntegerField(default=0, blank=True, verbose_name=u'有效天数') # 7, 30
|
|
|
pay_type = models.ManyToManyField(to='Pay_Type', verbose_name='付款类型', db_table='ai_store_meal_pay')
|
|
|
lang = models.ManyToManyField(to='Lang', verbose_name='套餐语言', db_table='ai_store_meal_lang')
|
|
|
add_time = models.DateTimeField(blank=True, verbose_name=u'添加时间', auto_now_add=True)
|
|
@@ -868,7 +874,7 @@ class Order_Model(models.Model):
|
|
|
orderID = models.CharField(blank=True, max_length=20, primary_key=True, verbose_name=u'订单id')
|
|
|
paymentID = models.CharField(blank=True, max_length=64, default='', verbose_name='付款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) # 订单关联用户
|
|
|
+ userID = models.ForeignKey(Device_User, to_field='userID', on_delete=models.CASCADE) # 订单关联用户
|
|
|
UID = models.CharField(max_length=20, verbose_name='设备UID')
|
|
|
channel = models.SmallIntegerField(default=0, verbose_name=u'通道数')
|
|
|
desc = models.CharField(max_length=50, default='', verbose_name='商品描述')
|
|
@@ -884,8 +890,10 @@ class Order_Model(models.Model):
|
|
|
payType = models.SmallIntegerField(default=0, verbose_name='支付方式')
|
|
|
payTime = models.IntegerField(verbose_name='支付成功时间', default=0)
|
|
|
rank = models.ForeignKey(Store_Meal, to_field='id', default='', on_delete=models.CASCADE, verbose_name='关联云存套餐表')
|
|
|
- ai_rank = models.ForeignKey(AiStoreMeal, to_field='id', default='', on_delete=models.CASCADE, verbose_name='关联ai套餐表')
|
|
|
- order_type = models.SmallIntegerField(default=0, verbose_name='订单类型:0:云存:1:ai')
|
|
|
+ ai_rank = models.ForeignKey(AiStoreMeal, to_field='id', default='', on_delete=models.CASCADE,
|
|
|
+ verbose_name='关联ai套餐表')
|
|
|
+ order_type = models.SmallIntegerField(default=0, verbose_name='订单类型:0:云存,1:ai,2:联通4G')
|
|
|
+ unify_combo_id = models.CharField(blank=True, default='', max_length=32, verbose_name=u'统一套餐id')
|
|
|
nickname = models.CharField(default='', max_length=64, verbose_name='设备昵称')
|
|
|
uid_bucket_id = models.IntegerField(default=0, verbose_name='关联uid_bucket的字段')
|
|
|
commodity_type = models.SmallIntegerField(default=0, verbose_name='云存储套餐类型')
|
|
@@ -909,16 +917,53 @@ class Order_Model(models.Model):
|
|
|
verbose_name_plural = verbose_name
|
|
|
ordering = ('-orderID',)
|
|
|
|
|
|
-class CouponModel(models.Model):
|
|
|
+
|
|
|
+# 优惠券文案语言表
|
|
|
+class CouponLang(models.Model):
|
|
|
+ id = models.AutoField(primary_key=True, verbose_name='自增ID')
|
|
|
+ lang = models.CharField(default='', max_length=20, db_index=True, verbose_name='语言/国家')
|
|
|
+ instruction = models.CharField(blank=True, default='', max_length=200, verbose_name=u'用法')
|
|
|
+ quota = models.CharField(blank=True, default='', max_length=200, verbose_name=u'优惠额度, 例如20.0%')
|
|
|
+ unit = models.CharField(blank=True, default='', max_length=200, verbose_name=u'优惠单位, 例如off, 折')
|
|
|
+ remark = models.CharField(blank=True, default='', max_length=200, verbose_name=u'备注')
|
|
|
+
|
|
|
+ def __str__(self):
|
|
|
+ return self.id
|
|
|
+
|
|
|
+ class Meta:
|
|
|
+ db_table = 'coupon_lang'
|
|
|
+ verbose_name = '套餐语言'
|
|
|
+ verbose_name_plural = verbose_name
|
|
|
+ ordering = ('id',)
|
|
|
+
|
|
|
+
|
|
|
+class CouponConfigModel(models.Model):
|
|
|
id = models.AutoField(primary_key=True, verbose_name='主键')
|
|
|
- userID_id = models.CharField(default='', db_index=True, blank=True, max_length=32, verbose_name=u'用户ID')
|
|
|
- use_status = models.SmallIntegerField(default=0, verbose_name='使用状态') #0未使用;1冻结;2已使用
|
|
|
- type = models.SmallIntegerField(default=0, verbose_name='优惠类型') #1打折; 2抵扣
|
|
|
+ type = models.SmallIntegerField(default=0, verbose_name='优惠类型') # 1打折; 2抵扣
|
|
|
+ use_range = models.CharField(default=0, max_length=100, verbose_name='使用限制') # 0:所有服务都可使用; 1:云存;2:ai;多种1,2,3
|
|
|
coupon_discount = models.CharField(blank=True, max_length=32, verbose_name=u'折扣力度')
|
|
|
- distributeTime = models.IntegerField(verbose_name='发放到用户账户时间', default=0)
|
|
|
- valid_time = models.PositiveIntegerField(default=9999999999, verbose_name='有效期间') #超过有效期不可在使用;0永久
|
|
|
- # use_limit = models.CharField(default=0, max_length=100, verbose_name='使用限制') #0:所有服务都可使用; 1:云存;2:ai;
|
|
|
- addTime = models.IntegerField(verbose_name='添加时间', default=0)
|
|
|
+ lang = models.ManyToManyField(to='CouponLang', verbose_name='套餐语言', db_table='coupon_lang_associated')
|
|
|
+
|
|
|
+ def __str__(self):
|
|
|
+ return self.id
|
|
|
+
|
|
|
+ class Meta:
|
|
|
+ db_table = 'coupon_config'
|
|
|
+ verbose_name = u'优惠券配置表'
|
|
|
+ verbose_name_plural = verbose_name
|
|
|
+
|
|
|
+
|
|
|
+class CouponModel(models.Model):
|
|
|
+ id = models.AutoField(primary_key=True, verbose_name='主键')
|
|
|
+ use_status = models.SmallIntegerField(default=0, verbose_name='使用状态') # 0未使用;1冻结;2已使用
|
|
|
+ distribute_time = models.IntegerField(verbose_name='发放到用户账户时间', default=0)
|
|
|
+ valid_time = models.PositiveIntegerField(default=9999999999, verbose_name='有效期间') # 超过有效期不可在使用;0永久
|
|
|
+ # userID = models.ForeignKey(Device_User, to_field='userID', on_delete=models.CASCADE) # 关联用户
|
|
|
+ userID = models.CharField(blank=True, max_length=32, db_index=True, verbose_name=u'用户ID')
|
|
|
+ coupon_config = models.ForeignKey(CouponConfigModel, null=True, blank=True, to_field='id', on_delete=models.CASCADE,
|
|
|
+ verbose_name='关联优惠券配置表的id')
|
|
|
+ update_time = models.IntegerField(verbose_name='更新时间', default=0)
|
|
|
+ create_time = models.IntegerField(verbose_name='添加时间', default=0)
|
|
|
|
|
|
def __str__(self):
|
|
|
return self.id
|
|
@@ -928,12 +973,13 @@ class CouponModel(models.Model):
|
|
|
verbose_name = u'优惠券'
|
|
|
verbose_name_plural = verbose_name
|
|
|
|
|
|
+
|
|
|
class PayCycleConfigModel(models.Model):
|
|
|
id = models.AutoField(primary_key=True, verbose_name='主键')
|
|
|
# name = models.CharField(default='',max_length=200, verbose_name='计划名字')
|
|
|
# tax = models.CharField(max_length=2000, default='', verbose_name='税金')
|
|
|
cycles = models.IntegerField(verbose_name='周期:0代表无限期', default=0)
|
|
|
- frequency = models.CharField(max_length=50,verbose_name='频率,MONTH,WEEK,YEAR', default=0)
|
|
|
+ frequency = models.CharField(max_length=50, verbose_name='频率,MONTH,WEEK,YEAR', default=0)
|
|
|
frequencyInterval = models.IntegerField(default=0, verbose_name='频率周期')
|
|
|
remark = models.CharField(max_length=1000, default='', verbose_name='备注')
|
|
|
|
|
@@ -945,16 +991,19 @@ class PayCycleConfigModel(models.Model):
|
|
|
verbose_name = u'周期付款计划'
|
|
|
verbose_name_plural = verbose_name
|
|
|
|
|
|
+
|
|
|
class PromotionRuleModel(models.Model):
|
|
|
id = models.AutoField(primary_key=True, verbose_name='主键')
|
|
|
- ruleName = models.TextField(default='', verbose_name='规则名字') #json格式, 例: {"cn":"黑色星期五","en":"Black Friday"}
|
|
|
- ruleDesc = models.TextField(default='', verbose_name='规则描述') #json格式, 例: {"cn":"买一送一","en":"buy one get one free"}
|
|
|
- ruleConfig = models.CharField(max_length=2000, default='', verbose_name='规则配置') #json格式, 例: {"buy": 1, "get": 1}
|
|
|
+ ruleName = models.TextField(default='', verbose_name='规则名字') # json格式, 例: {"cn":"黑色星期五","en":"Black Friday"}
|
|
|
+ ruleDesc = models.TextField(default='',
|
|
|
+ verbose_name='规则描述') # json格式, 例: {"cn":"买一送一","en":"buy one get one free"}
|
|
|
+ ruleConfig = models.CharField(max_length=2000, default='', verbose_name='规则配置') # json格式, 例: {"buy": 1, "get": 1}
|
|
|
startTime = models.IntegerField(verbose_name='促销活动开始时间', default=0)
|
|
|
endTime = models.IntegerField(verbose_name='促销活动结束时间', default=0)
|
|
|
status = models.SmallIntegerField(default=0, verbose_name='活动状态:0未进行;1进行中')
|
|
|
remark = models.CharField(max_length=50, default='', verbose_name='备注')
|
|
|
- popups = models.CharField(max_length=2000, default='', verbose_name='app弹窗消息') #json格式 ,例: {"cn":"买一送一","en":"buy one get one free"}
|
|
|
+ popups = models.CharField(max_length=2000, default='',
|
|
|
+ verbose_name='app弹窗消息') # json格式 ,例: {"cn":"买一送一","en":"buy one get one free"}
|
|
|
|
|
|
def __str__(self):
|
|
|
return self.id
|
|
@@ -966,7 +1015,6 @@ class PromotionRuleModel(models.Model):
|
|
|
ordering = ('-id',)
|
|
|
|
|
|
|
|
|
-
|
|
|
class VodHlsModel(models.Model):
|
|
|
id = models.AutoField(primary_key=True, verbose_name='回放列表主键')
|
|
|
uid = models.CharField(max_length=20, verbose_name='设备UID', db_index=True)
|
|
@@ -976,8 +1024,7 @@ class VodHlsModel(models.Model):
|
|
|
sec = models.IntegerField(verbose_name='秒数', default=0)
|
|
|
bucket = models.ForeignKey(VodBucketModel, blank=True, to_field='id', on_delete=models.CASCADE, default=1,
|
|
|
verbose_name='存储空间')
|
|
|
- fg = models.CharField(max_length=20,verbose_name='ts个数,时间描述片段数') # 阿里为时间片段数,亚马逊为一个32bit整型,前28bit代表ts文件的时长
|
|
|
-
|
|
|
+ fg = models.CharField(max_length=20, verbose_name='ts个数,时间描述片段数') # 阿里为时间片段数,亚马逊为一个32bit整型,前28bit代表ts文件的时长
|
|
|
|
|
|
def __str__(self):
|
|
|
return self.id
|
|
@@ -1016,7 +1063,7 @@ class StsCrdModel(models.Model):
|
|
|
addTime = models.IntegerField(verbose_name='添加时间', default=0)
|
|
|
bucket = models.ForeignKey(VodBucketModel, blank=True, to_field='id', on_delete=models.CASCADE, default=1,
|
|
|
verbose_name='存储空间')
|
|
|
- type = models.SmallIntegerField(default=0,verbose_name='sts类型') # 0:阿里云,1:s3
|
|
|
+ type = models.SmallIntegerField(default=0, verbose_name='sts类型') # 0:阿里云,1:s3
|
|
|
|
|
|
def __str__(self):
|
|
|
return self.id
|
|
@@ -1046,6 +1093,7 @@ class UID_Bucket(models.Model):
|
|
|
verbose_name_plural = verbose_name
|
|
|
ordering = ('id',)
|
|
|
|
|
|
+
|
|
|
class Unused_Uid_Meal(models.Model):
|
|
|
id = models.AutoField(primary_key=True, verbose_name=u'自增标记ID')
|
|
|
uid = models.CharField(max_length=20, verbose_name='设备UID', db_index=True)
|
|
@@ -1054,6 +1102,7 @@ class Unused_Uid_Meal(models.Model):
|
|
|
addTime = models.IntegerField(verbose_name='添加时间', default=0)
|
|
|
expire = models.IntegerField(verbose_name='存储桶存储时长[月份]', default=0)
|
|
|
num = models.IntegerField(verbose_name='个数', default=0)
|
|
|
+
|
|
|
# effect_time = models.BigIntegerField(verbose_name='生效时间', db_index=True, default=0)
|
|
|
# uid_bucket = models.ForeignKey(UID_Bucket, blank=True, to_field='id', on_delete=models.CASCADE, default=0,
|
|
|
# verbose_name='uid_bucket关联')
|
|
@@ -1111,14 +1160,14 @@ class UidSetModel(models.Model):
|
|
|
version = models.CharField(max_length=32, verbose_name='设备版本', default='')
|
|
|
p2p_region = models.CharField(max_length=16, verbose_name='设备p2p区域', default='ALL') # ALL CN EU US
|
|
|
cloud_vod = models.SmallIntegerField(default=2, verbose_name='云存开关') # 0,关闭,1开启,2,不支持
|
|
|
- tz = models.CharField(default='', max_length=16, verbose_name ='设备时区') # +8
|
|
|
+ tz = models.CharField(default='', max_length=16, verbose_name='设备时区') # +8
|
|
|
video_code = models.SmallIntegerField(default=0, verbose_name='编码类型') # 0:264,1:265
|
|
|
nickname = models.CharField(default='', max_length=64, verbose_name='设备昵称')
|
|
|
ip = models.CharField(max_length=20, default='', verbose_name=u'设备ip')
|
|
|
# 设备重置后第一次启动时间
|
|
|
is_alexa = models.IntegerField(default=0, verbose_name='是否支持alexa') # 0为不支持,1为支持,2为开启alexa发现
|
|
|
detect_group = models.CharField(default='', max_length=32, verbose_name=u'检测类型')
|
|
|
- pwd = models.CharField(max_length=32, default='', verbose_name=u'设备密码') # 暂时是预留字段
|
|
|
+ pwd = models.CharField(max_length=32, default='', verbose_name=u'设备密码') # 暂时是预留字段
|
|
|
resetTime = models.IntegerField(default=0, verbose_name='设备重置时间')
|
|
|
region_alexa = models.CharField(max_length=8, verbose_name='设备alexa区域', default='ALL') # ALL CN EU US
|
|
|
deviceModel = models.CharField(blank=True, max_length=64, default='', verbose_name=u'设备型号')
|
|
@@ -1137,6 +1186,9 @@ class UidSetModel(models.Model):
|
|
|
double_wifi = models.IntegerField(default=0, verbose_name='是否支持双频wifi。0:不支持,1:支持')
|
|
|
is_ptz = models.IntegerField(default=0, verbose_name='是否支持云台。0:不支持,1:支持')
|
|
|
is_ai = models.IntegerField(default=2, verbose_name='是否支持ai') # 0,关闭,1开启,2,不支持
|
|
|
+ is_notification = models.IntegerField(blank=True, default=1, verbose_name='新加-消息提醒开关') # 0:关闭,1:开启
|
|
|
+ new_detect_interval = models.IntegerField(blank=True, verbose_name='新加-消息提醒间隔', default=60) # 秒
|
|
|
+
|
|
|
class Meta:
|
|
|
db_table = 'uid_set'
|
|
|
verbose_name = u'设备配置表'
|
|
@@ -1380,7 +1432,7 @@ class GrantCodeModel(models.Model):
|
|
|
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:一个月以上
|
|
|
+ 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='更新时间')
|
|
@@ -1415,6 +1467,7 @@ class AppFrequencyYearStatisticsModel(models.Model):
|
|
|
verbose_name_plural = verbose_name
|
|
|
db_table = 'app_frequency_year_statistics'
|
|
|
|
|
|
+
|
|
|
# alexa连接数统计表
|
|
|
class AlexaConnectStatisticsModel(models.Model):
|
|
|
id = models.AutoField(primary_key=True)
|
|
@@ -1445,7 +1498,7 @@ class AppLogModel(models.Model):
|
|
|
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='失败状态') # 0: 成功,1: 失败
|
|
|
+ status = models.SmallIntegerField(default=0, verbose_name='失败状态') # 0: 成功,1: 失败
|
|
|
filename = models.CharField(max_length=120, default='', verbose_name='文件名')
|
|
|
add_time = models.IntegerField(default=0, verbose_name='日期')
|
|
|
|
|
@@ -1460,9 +1513,9 @@ class DeviceLogModel(models.Model):
|
|
|
ip = models.CharField(default='', max_length=32, verbose_name='ip')
|
|
|
uid = models.CharField(max_length=32, default='', verbose_name='设备uid')
|
|
|
serial_number = models.CharField(max_length=9, default='', verbose_name='序列号')
|
|
|
- status = models.SmallIntegerField(default=0, verbose_name='上传状态') # 0: 成功,1: 失败, 3非文件形式,与error_info相关
|
|
|
+ status = models.SmallIntegerField(default=0, verbose_name='上传状态') # 0: 成功,1: 失败, 3非文件形式,与error_info相关
|
|
|
filename = models.CharField(max_length=120, default='', verbose_name='文件名')
|
|
|
- error_info = models.TextField(blank = True, default = '', verbose_name='设备异常信息')
|
|
|
+ error_info = models.TextField(blank=True, default='', verbose_name='设备异常信息')
|
|
|
add_time = models.DateTimeField(blank=True, auto_now_add=True, verbose_name=u'添加时间')
|
|
|
|
|
|
class Meta:
|
|
@@ -1504,8 +1557,8 @@ class CountryIPModel(models.Model):
|
|
|
class ZositechHelpModel(models.Model):
|
|
|
id = models.AutoField(primary_key=True)
|
|
|
locale = models.CharField(default='', db_index=True, max_length=50, verbose_name='语言')
|
|
|
- label_names = models.CharField(default='', db_index=True, max_length=50, verbose_name='标签')
|
|
|
- origin = models.CharField(default='', db_index=True ,max_length=50, verbose_name='来源')
|
|
|
+ label_names = models.CharField(default='', db_index=True, max_length=50, verbose_name='标签')
|
|
|
+ origin = models.CharField(default='', db_index=True, max_length=50, verbose_name='来源')
|
|
|
# author_id = models.CharField(default='', max_length=50, verbose_name='管理员id')
|
|
|
# body = models.TextField(default='', blank=True, verbose_name='内容')
|
|
|
# comments_disabled = models.CharField(default='', max_length=10, verbose_name='comments')
|
|
@@ -1532,7 +1585,8 @@ class EquipmentVersionLimitModel(models.Model):
|
|
|
id = models.AutoField(primary_key=True)
|
|
|
type = models.SmallIntegerField(default=0, verbose_name='限制类型')
|
|
|
content = models.TextField(default='', verbose_name='限制内容')
|
|
|
- equipment_version = models.ForeignKey(Equipment_Version, to_field='eid', on_delete=models.CASCADE, verbose_name='关联设备版本信息id')
|
|
|
+ equipment_version = models.ForeignKey(Equipment_Version, to_field='eid', on_delete=models.CASCADE,
|
|
|
+ verbose_name='关联设备版本信息id')
|
|
|
status = models.SmallIntegerField(default=0, verbose_name='是否启用。0:不启用,1:启用')
|
|
|
add_time = models.IntegerField(default=0, verbose_name='添加时间')
|
|
|
update_time = models.IntegerField(default=0, verbose_name='更新时间')
|
|
@@ -1545,9 +1599,10 @@ class EquipmentVersionLimitModel(models.Model):
|
|
|
|
|
|
class ExperienceContextModel(models.Model):
|
|
|
id = models.AutoField(primary_key=True)
|
|
|
- experience_type = models.SmallIntegerField(default=0,verbose_name='体验类型') # 0: 免费体验套餐, 1: 激活码
|
|
|
+ experience_type = models.SmallIntegerField(default=0, verbose_name='体验类型') # 0: 免费体验套餐, 1: 激活码
|
|
|
uid = models.CharField(max_length=20, default='', verbose_name='设备uid')
|
|
|
do_time = models.IntegerField(default=0, verbose_name='激活时间')
|
|
|
+
|
|
|
# is_experience = models.SmallIntegerField(default=0, verbose_name=u'是否云存体验用户') # 0:不是体验用户,1:是体验用户
|
|
|
|
|
|
class Meta:
|
|
@@ -1555,13 +1610,26 @@ class ExperienceContextModel(models.Model):
|
|
|
verbose_name = '设备体验表'
|
|
|
verbose_name_plural = verbose_name
|
|
|
|
|
|
+
|
|
|
+class ExperienceAiModel(models.Model):
|
|
|
+ id = models.AutoField(primary_key=True)
|
|
|
+ experience_type = models.SmallIntegerField(default=0, verbose_name='体验类型') # 0: 免费体验, 1: 激活码
|
|
|
+ uid = models.CharField(max_length=20, default='', verbose_name='设备uid')
|
|
|
+ do_time = models.IntegerField(default=0, verbose_name='激活时间')
|
|
|
+
|
|
|
+ class Meta:
|
|
|
+ db_table = 'experience_ai'
|
|
|
+ verbose_name = 'ai体验表'
|
|
|
+ verbose_name_plural = verbose_name
|
|
|
+
|
|
|
+
|
|
|
class CDKcontextModel(models.Model):
|
|
|
id = models.AutoField(primary_key=True)
|
|
|
- cdk = models.CharField(max_length=50,unique=True,verbose_name='激活码')
|
|
|
+ cdk = models.CharField(max_length=50, unique=True, verbose_name='激活码')
|
|
|
create_time = models.IntegerField(default=0, verbose_name='创建时间')
|
|
|
- valid_time = models.IntegerField(default=0, verbose_name='有效期间') #超过有效期激活码不可在激活 ,0:永久
|
|
|
- is_activate = models.SmallIntegerField(default=0, verbose_name='是否已激活') #0 未激活 1 已激活
|
|
|
- is_down = models.SmallIntegerField(default=0, verbose_name='是否已下载') #0 未下载 1 已下载
|
|
|
+ valid_time = models.IntegerField(default=0, verbose_name='有效期间') # 超过有效期激活码不可在激活 ,0:永久
|
|
|
+ is_activate = models.SmallIntegerField(default=0, verbose_name='是否已激活') # 0 未激活 1 已激活
|
|
|
+ is_down = models.SmallIntegerField(default=0, verbose_name='是否已下载') # 0 未下载 1 已下载
|
|
|
rank = models.ForeignKey(Store_Meal, to_field='id', default='', on_delete=models.CASCADE, verbose_name='套餐类型')
|
|
|
# order = models.ForeignKey(Order_Model, blank=True, max_length=20, to_field='orderID', on_delete=models.CASCADE, verbose_name='订单id', unique=True)
|
|
|
order = models.CharField(max_length=20, blank=True, unique=True, verbose_name='订单id')
|
|
@@ -1612,6 +1680,45 @@ class DeviceTypeModel(models.Model):
|
|
|
verbose_name_plural = verbose_name
|
|
|
|
|
|
|
|
|
+class AppBundle(models.Model):
|
|
|
+ id = models.AutoField(primary_key=True)
|
|
|
+ app_bundle_id = models.CharField(default='', max_length=32, verbose_name='app版本id')
|
|
|
+ app_device_type = models.ManyToManyField(to='AppDeviceType', db_table='app_bundle_device_type',
|
|
|
+ verbose_name='APP版本-设备类型')
|
|
|
+
|
|
|
+ class Meta:
|
|
|
+ db_table = 'app_bundle'
|
|
|
+ verbose_name = 'APP版本表'
|
|
|
+ verbose_name_plural = verbose_name
|
|
|
+
|
|
|
+
|
|
|
+class AppDeviceType(models.Model):
|
|
|
+ id = models.AutoField(primary_key=True)
|
|
|
+ model = models.SmallIntegerField(default=0, verbose_name='设备类型') # 1:DVR, 2:IPC
|
|
|
+ type = models.IntegerField(default=0, verbose_name='设备型号')
|
|
|
+ icon = models.CharField(default='', max_length=200, verbose_name='图标文件路径')
|
|
|
+
|
|
|
+ class Meta:
|
|
|
+ db_table = 'app_device_type'
|
|
|
+ verbose_name = 'APP设备类型表'
|
|
|
+ verbose_name_plural = verbose_name
|
|
|
+
|
|
|
+
|
|
|
+class DeviceNameLanguage(models.Model):
|
|
|
+ id = models.AutoField(primary_key=True)
|
|
|
+ app_device_type = models.ForeignKey(AppDeviceType, to_field='id', default='', on_delete=models.CASCADE,
|
|
|
+ verbose_name='关联APP设备类型表id')
|
|
|
+ lang = models.CharField(default='', max_length=10, verbose_name='语言')
|
|
|
+ name = models.CharField(default='', max_length=32, verbose_name='设备名称')
|
|
|
+ sort = models.SmallIntegerField(default=0, verbose_name=u'升序排序')
|
|
|
+
|
|
|
+ class Meta:
|
|
|
+ ordering = ('sort',)
|
|
|
+ db_table = 'device_name_language'
|
|
|
+ verbose_name = '设备名称语言表'
|
|
|
+ verbose_name_plural = verbose_name
|
|
|
+
|
|
|
+
|
|
|
class OperatingLogsModel(models.Model):
|
|
|
id = models.AutoField(primary_key=True)
|
|
|
userId = models.CharField(blank=False, max_length=32, db_index=True, verbose_name=u'操作人')
|
|
@@ -1640,6 +1747,7 @@ class ProcessInfoLogsModel(models.Model):
|
|
|
verbose_name = '过程信息表'
|
|
|
verbose_name_plural = verbose_name
|
|
|
|
|
|
+
|
|
|
class EquipmentLogModel(models.Model):
|
|
|
id = models.AutoField(primary_key=True)
|
|
|
user = models.CharField(blank=False, max_length=32, db_index=True, verbose_name=u'操作用户')
|
|
@@ -1650,6 +1758,7 @@ class EquipmentLogModel(models.Model):
|
|
|
time = models.DateTimeField(null=True, blank=True, db_index=True, verbose_name=u'访问时间')
|
|
|
operatingcontent = models.TextField(blank=True, default='', verbose_name=u'操作内容')
|
|
|
url = models.CharField(max_length=150, default='', blank=True, verbose_name=u'访问路径')
|
|
|
+
|
|
|
class Meta:
|
|
|
db_table = 'equipment_log'
|
|
|
verbose_name = '设备日志表'
|
|
@@ -1693,7 +1802,6 @@ class RegionModel(models.Model):
|
|
|
continent_code = models.CharField(max_length=3, default='', verbose_name='洲代码')
|
|
|
api = models.CharField(max_length=50, default='', verbose_name='请求地址')
|
|
|
|
|
|
-
|
|
|
class Meta:
|
|
|
db_table = 'tb_region'
|
|
|
verbose_name = '区域表'
|
|
@@ -1720,10 +1828,10 @@ class UIDModel(models.Model):
|
|
|
uid = models.CharField(max_length=20, null=False, db_index=True, unique=True, verbose_name='设备id')
|
|
|
mac = models.CharField(max_length=17, null=True, default='', verbose_name='设备id对应的mac地址')
|
|
|
uid_extra = models.TextField(default='', verbose_name='uid的额外描述')
|
|
|
- status = models.SmallIntegerField(default=0, verbose_name='使用状态') # 0:未使用, 2:已使用
|
|
|
+ status = models.SmallIntegerField(default=0, verbose_name='使用状态') # 0:未使用, 2:已使用
|
|
|
add_time = models.IntegerField(default=0, verbose_name='添加时间')
|
|
|
update_time = models.IntegerField(default=0, verbose_name='更新时间')
|
|
|
- area = models.SmallIntegerField(default=0, verbose_name='区域') # 0:国内, 1:国外
|
|
|
+ area = models.SmallIntegerField(default=0, verbose_name='区域') # 0:国内, 1:国外
|
|
|
vpg = models.ForeignKey(VPGModel, to_field='id', default=1, on_delete=models.DO_NOTHING, verbose_name='关联VPG表的id')
|
|
|
p2p_type = models.IntegerField(default=1, verbose_name='p2p类型。1:宸云,2:tutk')
|
|
|
full_uid_code = models.CharField(max_length=256, default='', verbose_name='宸云完整uid')
|
|
@@ -1895,7 +2003,8 @@ class CompanySerialModel(models.Model):
|
|
|
class UIDCompanySerialModel(models.Model):
|
|
|
id = models.AutoField(primary_key=True)
|
|
|
uid = models.ForeignKey(UIDModel, to_field='id', on_delete=models.CASCADE, verbose_name='关联UID表')
|
|
|
- company_serial = models.ForeignKey(CompanySerialModel, to_field='id', on_delete=models.CASCADE, verbose_name='6位数序列号')
|
|
|
+ company_serial = models.ForeignKey(CompanySerialModel, to_field='id', on_delete=models.CASCADE,
|
|
|
+ verbose_name='6位数序列号')
|
|
|
add_time = models.IntegerField(default=0, verbose_name='添加时间')
|
|
|
update_time = models.IntegerField(default=0, verbose_name='更新时间')
|
|
|
|
|
@@ -1907,7 +2016,8 @@ class UIDCompanySerialModel(models.Model):
|
|
|
|
|
|
class iotdeviceInfoModel(models.Model):
|
|
|
id = models.AutoField(primary_key=True)
|
|
|
- serial_number = models.CharField(max_length=11, blank=True, default='', db_index=True, verbose_name=u'关联Device_Info表的序列号')
|
|
|
+ serial_number = models.CharField(max_length=11, blank=True, default='', db_index=True,
|
|
|
+ verbose_name=u'关联Device_Info表的序列号')
|
|
|
uid = models.CharField(blank=True, max_length=32, default='', db_index=True, verbose_name=u'设备UID')
|
|
|
certificate_id = models.CharField(blank=True, max_length=256, default='', verbose_name=u'证书id')
|
|
|
certificate_pem = models.TextField(blank=True, default='', verbose_name=u'证书项目')
|
|
@@ -1916,9 +2026,10 @@ class iotdeviceInfoModel(models.Model):
|
|
|
thing_name = models.CharField(blank=True, max_length=256, default='', verbose_name=u'IoT Thing Name')
|
|
|
thing_groups = models.CharField(blank=True, max_length=256, default='', verbose_name=u'IoT Thing Groups')
|
|
|
endpoint = models.CharField(blank=True, max_length=256, db_index=True, default='', verbose_name=u'iot端点')
|
|
|
- token_iot_number = models.CharField(blank=True, db_index=True, default='', max_length=50, verbose_name='连接iot令牌')
|
|
|
+ token_iot_number = models.CharField(blank=True, db_index=True, default='', max_length=50, verbose_name='连接iot令牌')
|
|
|
add_time = models.DateTimeField(blank=True, auto_now_add=True, verbose_name=u'添加时间')
|
|
|
update_time = models.DateTimeField(blank=True, auto_now=True, verbose_name=u'更新时间')
|
|
|
+
|
|
|
class Meta:
|
|
|
db_table = 'iot_deviceInfo'
|
|
|
verbose_name = 'iot设备信息表'
|
|
@@ -1930,6 +2041,7 @@ class UIDMainUser(models.Model):
|
|
|
id = models.AutoField(primary_key=True)
|
|
|
UID = models.CharField(blank=True, max_length=32, verbose_name=u'设备UID', default='')
|
|
|
user_id = models.CharField(blank=True, max_length=32, verbose_name=u'用户ID', default='')
|
|
|
+
|
|
|
class Meta:
|
|
|
db_table = 'uid_mainuser'
|
|
|
verbose_name = '设备主用户表'
|
|
@@ -1954,7 +2066,6 @@ class Pc_Info(models.Model):
|
|
|
content = models.TextField(blank=True, default='', verbose_name=u'内容信息')
|
|
|
authority = models.SmallIntegerField(blank=True, default=0, verbose_name='权限')
|
|
|
|
|
|
-
|
|
|
class Meta:
|
|
|
db_table = 'pc_info'
|
|
|
verbose_name = u'pc信息表'
|
|
@@ -1971,6 +2082,7 @@ class CloudLogModel(models.Model):
|
|
|
url = models.CharField(max_length=150, default='', blank=True, verbose_name=u'访问路径')
|
|
|
time = models.IntegerField(null=True, blank=True, db_index=True, verbose_name=u'访问时间')
|
|
|
content = models.TextField(blank=True, default='', verbose_name=u'参数内容')
|
|
|
+
|
|
|
class Meta:
|
|
|
db_table = 'cloud_log'
|
|
|
verbose_name = '云存api记录表'
|
|
@@ -1995,6 +2107,7 @@ class PctestjobModel(models.Model):
|
|
|
id = models.AutoField(primary_key=True, verbose_name=u'自增标记ID')
|
|
|
jobname = models.CharField(blank=True, max_length=32, verbose_name=u'岗位名字')
|
|
|
jobcode = models.SmallIntegerField(default=3, verbose_name='岗位code 。1:管理员,3:普通人员')
|
|
|
+
|
|
|
class Meta:
|
|
|
db_table = 'pctest_job'
|
|
|
verbose_name = u'pc岗位表'
|
|
@@ -2030,6 +2143,7 @@ class PctestfunctionModel(models.Model):
|
|
|
id = models.AutoField(primary_key=True, verbose_name=u'自增标记ID')
|
|
|
functionname = models.CharField(blank=True, max_length=32, verbose_name=u'职能名字')
|
|
|
functioncode = models.SmallIntegerField(default=1, verbose_name='职能code 。PC端自己逻辑判断')
|
|
|
+
|
|
|
class Meta:
|
|
|
db_table = 'pctest_function'
|
|
|
verbose_name = u'pc设备职能表'
|
|
@@ -2078,7 +2192,8 @@ class PctestjobdeviceModel(models.Model):
|
|
|
class PctestModel(models.Model):
|
|
|
id = models.AutoField(primary_key=True, verbose_name=u'自增标记ID')
|
|
|
device = models.ForeignKey(PctestdeviceModel, to_field='id', on_delete=models.DO_NOTHING, verbose_name='关联pc测试设备表')
|
|
|
- function = models.ForeignKey(PctestfunctionModel, to_field='id', on_delete=models.DO_NOTHING, verbose_name='关联pc设备职能表')
|
|
|
+ function = models.ForeignKey(PctestfunctionModel, to_field='id', on_delete=models.DO_NOTHING,
|
|
|
+ verbose_name='关联pc设备职能表')
|
|
|
|
|
|
class Meta:
|
|
|
db_table = 'pctest_device_function'
|
|
@@ -2108,12 +2223,9 @@ class P2PIpModel(models.Model):
|
|
|
|
|
|
class DeviceDomainModel(models.Model):
|
|
|
id = models.AutoField(primary_key=True, verbose_name=u'自增标记ID')
|
|
|
- uid = models.CharField(max_length=20, default='', unique=True, db_index=True, verbose_name='uid')
|
|
|
- serial_number = models.CharField(max_length=9, default='', unique=True, db_index=True, verbose_name='序列号')
|
|
|
ip = models.CharField(default='', max_length=32, verbose_name='ip')
|
|
|
country_name = models.CharField(max_length=20, default='', verbose_name='国家名')
|
|
|
api = models.CharField(max_length=50, default='', verbose_name='使用的域名')
|
|
|
- region_id = models.SmallIntegerField(default=0, verbose_name='地区id')
|
|
|
add_time = models.DateTimeField(blank=True, auto_now_add=True, verbose_name=u'添加时间')
|
|
|
update_time = models.DateTimeField(blank=True, auto_now=True, verbose_name=u'更新时间')
|
|
|
|
|
@@ -2123,6 +2235,22 @@ class DeviceDomainModel(models.Model):
|
|
|
verbose_name_plural = verbose_name
|
|
|
|
|
|
|
|
|
+class DeviceDomainRegionModel(models.Model):
|
|
|
+ id = models.AutoField(primary_key=True, verbose_name=u'自增标记ID')
|
|
|
+ serial_number = models.CharField(max_length=9, default='', verbose_name='序列号')
|
|
|
+ ip = models.CharField(default='', max_length=32, verbose_name='ip')
|
|
|
+ country_name = models.CharField(max_length=20, default='', verbose_name='国家名')
|
|
|
+ api = models.CharField(max_length=50, default='', verbose_name='使用的域名')
|
|
|
+ region_id = models.SmallIntegerField(default=0, verbose_name='地区id')
|
|
|
+ add_time = models.DateTimeField(blank=True, auto_now_add=True, verbose_name=u'添加时间')
|
|
|
+ update_time = models.DateTimeField(blank=True, auto_now=True, verbose_name=u'更新时间')
|
|
|
+
|
|
|
+ class Meta:
|
|
|
+ db_table = 'device_domain_region'
|
|
|
+ verbose_name = u'设备域名地区表'
|
|
|
+ verbose_name_plural = verbose_name
|
|
|
+
|
|
|
+
|
|
|
class RequestRecordModel(models.Model):
|
|
|
id = models.AutoField(primary_key=True, verbose_name=u'自增ID')
|
|
|
method = models.CharField(max_length=10, default='', verbose_name='请求类型')
|
|
@@ -2144,16 +2272,17 @@ class AiService(models.Model):
|
|
|
id = models.AutoField(primary_key=True, verbose_name=u'自增标记ID')
|
|
|
uid = models.CharField(max_length=20, verbose_name='设备UID', db_index=True)
|
|
|
channel = models.SmallIntegerField(default=0, verbose_name='通道')
|
|
|
- orders = models.ForeignKey(Order_Model, to_field='orderID', default='', on_delete=models.CASCADE, verbose_name='关联订单表')
|
|
|
- detect_status = models.SmallIntegerField(default=0, verbose_name='状态[0:关闭,1:开启]')
|
|
|
+ orders = models.ForeignKey(Order_Model, to_field='orderID', default='', on_delete=models.CASCADE,
|
|
|
+ verbose_name='关联订单表')
|
|
|
+ detect_status = models.SmallIntegerField(default=0, verbose_name='状态') # 0:关闭, 1:开启
|
|
|
endTime = models.BigIntegerField(verbose_name='套餐结束时间', db_index=True, default=0)
|
|
|
addTime = models.IntegerField(verbose_name='添加时间', default=0)
|
|
|
updTime = models.BigIntegerField(verbose_name='更新时间', default=0)
|
|
|
- use_status = models.IntegerField(verbose_name='使用状态[0:未使用,1:使用中,2已过期]', default=0)
|
|
|
- detect_group = models.CharField(blank=True, default='1', max_length=100, verbose_name='侦测类型[1=人;2=动物;3=车]')
|
|
|
+ use_status = models.IntegerField(verbose_name='使用状态', default=0) # 0:未使用, 1:使用中, 2:已过期
|
|
|
+ # 1:人, 2:动物, 3:车, 4:包裹
|
|
|
+ detect_group = models.CharField(blank=True, default='1', max_length=100, verbose_name='侦测类型')
|
|
|
detect_interval = models.IntegerField(verbose_name='推送间隔', default=60) # 秒
|
|
|
|
|
|
-
|
|
|
class Meta:
|
|
|
db_table = 'ai_service'
|
|
|
verbose_name = 'ai设备服务表'
|
|
@@ -2263,6 +2392,7 @@ class CloudVodSurveysOperateLog(models.Model):
|
|
|
verbose_name_plural = verbose_name
|
|
|
ordering = ('id',)
|
|
|
|
|
|
+
|
|
|
class DeviceOTAUpgradeRecord(models.Model):
|
|
|
id = models.AutoField(primary_key=True, verbose_name=u'自增标记ID')
|
|
|
created_time = models.IntegerField(default=0, verbose_name='创建时间')
|
|
@@ -2272,12 +2402,14 @@ class DeviceOTAUpgradeRecord(models.Model):
|
|
|
serial_number = models.CharField(max_length=11, blank=True, verbose_name='序列号', default='')
|
|
|
uid = models.CharField(max_length=22, blank=True, verbose_name='设备UID', default='')
|
|
|
mci = models.CharField(max_length=10, blank=True, verbose_name='设备大类:IPC/NVR/DVR', default='')
|
|
|
+
|
|
|
class Meta:
|
|
|
db_table = 'device_OTA_upgrade_record'
|
|
|
verbose_name = '设备OTA升级记录'
|
|
|
verbose_name_plural = verbose_name
|
|
|
ordering = ('id',)
|
|
|
|
|
|
+
|
|
|
class PaypalWebHookEvent(models.Model):
|
|
|
id = models.AutoField(primary_key=True, verbose_name=u'自增标记ID')
|
|
|
webhook_event_id = models.CharField(max_length=200, blank=True, verbose_name='webhook事件ID', default='')
|
|
@@ -2298,4 +2430,272 @@ class PaypalWebHookEvent(models.Model):
|
|
|
db_table = 'paypal_webhook_event'
|
|
|
verbose_name = 'paypal钩子事件记录表'
|
|
|
verbose_name_plural = verbose_name
|
|
|
- ordering = ('id',)
|
|
|
+ ordering = ('id',)
|
|
|
+
|
|
|
+
|
|
|
+class PopupsConfig(models.Model):
|
|
|
+ id = models.AutoField(primary_key=True, verbose_name=u'自增标记ID')
|
|
|
+
|
|
|
+ title = models.CharField(max_length=1000, verbose_name='弹窗标题', blank=True, default='')
|
|
|
+ content = models.CharField(max_length=1000, verbose_name='弹窗内容', blank=True, default='')
|
|
|
+ tag = models.SmallIntegerField(default=0, verbose_name='app跳转页面标签{1:云存储购 2:AI购买 3:优惠券}')
|
|
|
+ start_time = models.IntegerField(default=0, verbose_name='更新时间')
|
|
|
+ end_time = models.IntegerField(default=0, verbose_name='创建时间')
|
|
|
+ lang = models.CharField(blank=True, max_length=16, default='en', verbose_name=u'语言地区')
|
|
|
+
|
|
|
+ class Meta:
|
|
|
+ db_table = 'popups_config'
|
|
|
+ verbose_name = 'app弹窗设置'
|
|
|
+ verbose_name_plural = verbose_name
|
|
|
+ ordering = ('id',)
|
|
|
+
|
|
|
+
|
|
|
+class RedDotsConfig(models.Model):
|
|
|
+ id = models.AutoField(primary_key=True, verbose_name=u'自增标记ID')
|
|
|
+ module = models.CharField(max_length=1000, verbose_name='app模块', blank=True, default='')
|
|
|
+ start_time = models.IntegerField(default=0, verbose_name='更新时间')
|
|
|
+ end_time = models.IntegerField(default=0, verbose_name='创建时间')
|
|
|
+
|
|
|
+ class Meta:
|
|
|
+ db_table = 'red_dots_config'
|
|
|
+ verbose_name = '红点标记配置'
|
|
|
+ verbose_name_plural = verbose_name
|
|
|
+ ordering = ('id',)
|
|
|
+
|
|
|
+
|
|
|
+class UserFamily(models.Model):
|
|
|
+ id = models.AutoField(primary_key=True, verbose_name=u'自增标记ID')
|
|
|
+ user = models.ForeignKey(Device_User, to_field='userID', default='', on_delete=models.CASCADE,
|
|
|
+ verbose_name='关联用户表ID')
|
|
|
+ name = models.CharField(max_length=50, db_index=True, verbose_name=u'家庭名称', default='', blank=True)
|
|
|
+ location = models.CharField(max_length=100, verbose_name='位置', blank=True, default='')
|
|
|
+ sort = models.IntegerField(default=99, blank=True, verbose_name=u'排序,越小越靠前')
|
|
|
+ updated_time = models.IntegerField(default=0, verbose_name='更新时间')
|
|
|
+ created_time = models.IntegerField(default=0, verbose_name='创建时间')
|
|
|
+
|
|
|
+ class Meta:
|
|
|
+ db_table = 'user_family'
|
|
|
+ verbose_name = '用户家庭'
|
|
|
+ verbose_name_plural = verbose_name
|
|
|
+
|
|
|
+
|
|
|
+class FamilyMemberPermission(models.Model):
|
|
|
+ id = models.AutoField(primary_key=True, verbose_name=u'自增标记ID')
|
|
|
+ no = models.CharField(max_length=10, unique=True, verbose_name='编号', default=0)
|
|
|
+ name = models.CharField(max_length=50, verbose_name=u'权限名称', default='')
|
|
|
+ sort = models.IntegerField(default=99, blank=True, verbose_name=u'排序,越小越靠前')
|
|
|
+ describe = models.CharField(max_length=128, blank=True, verbose_name='权限描述', default=0)
|
|
|
+ updated_time = models.IntegerField(default=0, verbose_name='更新时间')
|
|
|
+ created_time = models.IntegerField(default=0, verbose_name='创建时间')
|
|
|
+
|
|
|
+ class Meta:
|
|
|
+ db_table = 'family_member_permission'
|
|
|
+ verbose_name = '家庭成员权限'
|
|
|
+ verbose_name_plural = verbose_name
|
|
|
+
|
|
|
+
|
|
|
+class FamilyMember(models.Model):
|
|
|
+ id = models.AutoField(primary_key=True, verbose_name=u'自增标记ID')
|
|
|
+ user = models.ForeignKey(Device_User, to_field='userID', default='', on_delete=models.CASCADE,
|
|
|
+ verbose_name='关联用户表id')
|
|
|
+ user_name = models.CharField(max_length=64, db_index=True, verbose_name=u'用户名', default='', blank=True)
|
|
|
+ family = models.ForeignKey(UserFamily, to_field='id', default='', on_delete=models.CASCADE,
|
|
|
+ verbose_name='关联用户家庭id')
|
|
|
+ sort = models.IntegerField(default=99, blank=True, verbose_name=u'排序,越小越靠前')
|
|
|
+ identity = models.SmallIntegerField(default=0, verbose_name='状态{0:普通成员,1:屋主}')
|
|
|
+ permission = models.ForeignKey(FamilyMemberPermission, to_field='id', default='', on_delete=models.CASCADE,
|
|
|
+ verbose_name='关联用户家庭id')
|
|
|
+ updated_time = models.IntegerField(default=0, verbose_name='更新时间')
|
|
|
+ created_time = models.IntegerField(default=0, verbose_name='创建时间')
|
|
|
+
|
|
|
+ class Meta:
|
|
|
+ db_table = 'family_member'
|
|
|
+ verbose_name = '家庭成员'
|
|
|
+ verbose_name_plural = verbose_name
|
|
|
+
|
|
|
+
|
|
|
+class FamilyRoom(models.Model):
|
|
|
+ id = models.AutoField(primary_key=True, verbose_name=u'自增标记ID')
|
|
|
+ name = models.CharField(max_length=128, verbose_name=u'房间名称', default='', blank=True)
|
|
|
+ family = models.ForeignKey(UserFamily, to_field='id', default='', on_delete=models.CASCADE,
|
|
|
+ verbose_name='关联用户家庭id')
|
|
|
+ sort = models.IntegerField(default=99, blank=True, verbose_name=u'排序,越小越靠前')
|
|
|
+ updated_time = models.IntegerField(default=0, verbose_name='更新时间')
|
|
|
+ created_time = models.IntegerField(default=0, verbose_name='创建时间')
|
|
|
+
|
|
|
+ class Meta:
|
|
|
+ db_table = 'family_room'
|
|
|
+ verbose_name = '家庭房间'
|
|
|
+ verbose_name_plural = verbose_name
|
|
|
+
|
|
|
+
|
|
|
+class GatewaySubDevice(models.Model):
|
|
|
+ id = models.AutoField(primary_key=True, verbose_name=u'自增标记ID')
|
|
|
+ device = models.ForeignKey(Device_Info, to_field='id', default='', on_delete=models.CASCADE,
|
|
|
+ verbose_name='关联设备信息id')
|
|
|
+ device_type = models.SmallIntegerField(default=0, verbose_name=u'设备类型')
|
|
|
+ nickname = models.CharField(default='', max_length=32, verbose_name=u'设备名称')
|
|
|
+ ieee_addr = models.CharField(default='', max_length=64, verbose_name=u'长地址')
|
|
|
+ src_addr = models.CharField(default='', max_length=16, verbose_name=u'短地址')
|
|
|
+ status = models.SmallIntegerField(default=0, verbose_name='状态') # 0:关闭, 1:开启
|
|
|
+ is_tampered = models.SmallIntegerField(default=0, verbose_name='拆动状态') # 0:正常, 1:被拆动
|
|
|
+ mac = models.CharField(default='', max_length=32, verbose_name=u'mac地址')
|
|
|
+ device_model = models.CharField(default='', max_length=16, verbose_name=u'设备型号')
|
|
|
+ manufacturer = models.CharField(default='', max_length=16, verbose_name=u'制造商')
|
|
|
+ sensor_serial = models.CharField(default='', max_length=32, verbose_name=u'传感器序列号')
|
|
|
+ firmware_version = models.CharField(default='', max_length=32, verbose_name=u'固件版本')
|
|
|
+ hardware_version = models.CharField(default='', max_length=32, verbose_name=u'硬件版本')
|
|
|
+ created_time = models.IntegerField(default=0, verbose_name='创建时间')
|
|
|
+ updated_time = models.IntegerField(default=0, verbose_name='更新时间')
|
|
|
+
|
|
|
+ class Meta:
|
|
|
+ db_table = 'gateway_sub_device'
|
|
|
+ verbose_name = '网关子设备'
|
|
|
+ verbose_name_plural = verbose_name
|
|
|
+
|
|
|
+
|
|
|
+class FamilyRoomDevice(models.Model):
|
|
|
+ id = models.AutoField(primary_key=True, verbose_name=u'自增标记ID')
|
|
|
+ room_id = models.IntegerField(default=0, blank=True, verbose_name=u'房间id')
|
|
|
+ family_id = models.IntegerField(default=0, blank=True, verbose_name=u'家庭id')
|
|
|
+ device = models.ForeignKey(Device_Info, to_field='id', default='', on_delete=models.CASCADE,
|
|
|
+ verbose_name='关联设备信息id')
|
|
|
+ sub_device = models.IntegerField(default=0, blank=True, verbose_name='关联子设备信息id')
|
|
|
+ sort = models.IntegerField(default=0, blank=True, verbose_name=u'排序,越小越靠前')
|
|
|
+ updated_time = models.IntegerField(default=0, verbose_name='更新时间')
|
|
|
+ created_time = models.IntegerField(default=0, verbose_name='创建时间')
|
|
|
+
|
|
|
+ class Meta:
|
|
|
+ db_table = 'family_room_device'
|
|
|
+ verbose_name = '家庭房间关联设备'
|
|
|
+ verbose_name_plural = verbose_name
|
|
|
+
|
|
|
+
|
|
|
+class FamilyMemberJoin(models.Model):
|
|
|
+ id = models.AutoField(primary_key=True, verbose_name=u'自增标记ID')
|
|
|
+ user = models.ForeignKey(Device_User, to_field='userID', default='', on_delete=models.CASCADE,
|
|
|
+ verbose_name='关联用户表id')
|
|
|
+ family = models.ForeignKey(UserFamily, to_field='id', default='', on_delete=models.CASCADE,
|
|
|
+ verbose_name='关联用户家庭id')
|
|
|
+ status = models.SmallIntegerField(default=0, verbose_name='状态{0:未确认,1:拒绝,2:同意}')
|
|
|
+ # 0:家庭所有者搜索邀请,1:成员扫码加入
|
|
|
+ type = models.SmallIntegerField(default=0, verbose_name='类型')
|
|
|
+ updated_time = models.IntegerField(default=0, verbose_name='更新时间')
|
|
|
+ created_time = models.IntegerField(default=0, verbose_name='创建时间')
|
|
|
+
|
|
|
+ class Meta:
|
|
|
+ db_table = 'family_member_join'
|
|
|
+ verbose_name = '家庭成员加入'
|
|
|
+ verbose_name_plural = verbose_name
|
|
|
+
|
|
|
+
|
|
|
+class SensorRecord(models.Model):
|
|
|
+ id = models.AutoField(primary_key=True, verbose_name=u'自增标记ID')
|
|
|
+ gateway_sub_device_id = models.IntegerField(default=0, blank=True, verbose_name=u'网关子设备id')
|
|
|
+ alarm = models.CharField(default='', max_length=32, verbose_name=u'消息内容')
|
|
|
+ event_type = models.SmallIntegerField(default=0, verbose_name=u'消息类型')
|
|
|
+ created_time = models.IntegerField(default=0, verbose_name='创建时间')
|
|
|
+
|
|
|
+ class Meta:
|
|
|
+ db_table = 'sensor_record'
|
|
|
+ verbose_name = '传感器记录'
|
|
|
+ verbose_name_plural = verbose_name
|
|
|
+ app_label = 'PushModel'
|
|
|
+
|
|
|
+
|
|
|
+class UnicomCombo(models.Model):
|
|
|
+ id = models.AutoField(primary_key=True, verbose_name=u'自增标记Id')
|
|
|
+ package_id = models.CharField(default='', max_length=32, verbose_name=u'联通套餐id')
|
|
|
+ combo_name = models.CharField(default='', max_length=32, verbose_name=u'套餐名称')
|
|
|
+ status = models.SmallIntegerField(default=0, verbose_name='状态{0:开启,1:停用}')
|
|
|
+ flow_total = models.IntegerField(default=0, blank=True, verbose_name=u'流量总量值 单位(MB)')
|
|
|
+ expiration_days = models.IntegerField(default=0, blank=True, verbose_name=u'有效期天数')
|
|
|
+ expiration_type = models.SmallIntegerField(default=0, verbose_name=u'有效期类型,0=天,1=月,2=年')
|
|
|
+ pay_type = models.ManyToManyField(to='Pay_Type', verbose_name='付款类型', db_table='unicom_combo_pay_type')
|
|
|
+ price = models.CharField(blank=True, max_length=32, verbose_name=u'价格')
|
|
|
+ sort = models.IntegerField(default=0, blank=True, verbose_name=u'排序,越小越靠前')
|
|
|
+ remark = models.TextField(blank=True, default='', verbose_name=u'描述信息')
|
|
|
+ updated_time = models.IntegerField(default=0, verbose_name='更新时间')
|
|
|
+ created_time = models.IntegerField(default=0, verbose_name='创建时间')
|
|
|
+ is_show = models.SmallIntegerField(default=1, verbose_name=u'是否显示,0:不显示,1:显示')
|
|
|
+ is_del = models.BooleanField(blank=True, default=False, verbose_name=u'是否删除默认false')
|
|
|
+
|
|
|
+ class Meta:
|
|
|
+ db_table = 'unicom_combo'
|
|
|
+ verbose_name = '联通套餐表'
|
|
|
+ verbose_name_plural = verbose_name
|
|
|
+
|
|
|
+
|
|
|
+class UnicomComboOrderInfo(models.Model):
|
|
|
+ id = models.AutoField(primary_key=True, verbose_name=u'自增标记Id')
|
|
|
+ iccid = models.CharField(default='', max_length=32, verbose_name=u'完整的20位纯数字ICCID')
|
|
|
+ renew_list_id = models.CharField(default='', max_length=32, verbose_name=u'联通订购成功套餐队列id')
|
|
|
+ status = models.SmallIntegerField(default=0, verbose_name='状态{0:未使用,1:已使用,2:已过期}')
|
|
|
+ orders = models.ForeignKey(Order_Model, to_field='orderID', default='', on_delete=models.CASCADE,
|
|
|
+ verbose_name='关联订单表')
|
|
|
+ combo = models.ForeignKey(UnicomCombo, to_field='id', default='', on_delete=models.CASCADE,
|
|
|
+ verbose_name=u'联通套餐表')
|
|
|
+ activation_time = models.IntegerField(default=0, verbose_name='激活时间')
|
|
|
+ expire_time = models.IntegerField(default=0, verbose_name='过期时间')
|
|
|
+ updated_time = models.IntegerField(default=0, verbose_name='更新时间')
|
|
|
+ created_time = models.IntegerField(default=0, verbose_name='创建时间')
|
|
|
+ is_del = models.BooleanField(blank=True, default=False, verbose_name=u'是否删除')
|
|
|
+
|
|
|
+ class Meta:
|
|
|
+ db_table = 'unicom_combo_order_info'
|
|
|
+ verbose_name = '联通套餐订单信息表'
|
|
|
+ verbose_name_plural = verbose_name
|
|
|
+
|
|
|
+
|
|
|
+class UnicomDeviceInfo(models.Model):
|
|
|
+ id = models.AutoField(primary_key=True, verbose_name=u'自增标记Id')
|
|
|
+ iccid = models.CharField(default='', max_length=32, verbose_name=u'完整的20位纯数字ICCID')
|
|
|
+ serial_no = models.CharField(default='', max_length=32, verbose_name=u'设备序列号')
|
|
|
+ user_id = models.CharField(blank=True, max_length=32, verbose_name=u'用户id')
|
|
|
+ updated_time = models.IntegerField(default=0, verbose_name='更新时间')
|
|
|
+ created_time = models.IntegerField(default=0, verbose_name='创建时间')
|
|
|
+
|
|
|
+ class Meta:
|
|
|
+ db_table = 'unicom_device_info'
|
|
|
+ verbose_name = '联通设备信息'
|
|
|
+ verbose_name_plural = verbose_name
|
|
|
+
|
|
|
+
|
|
|
+class UnicomDeviceQueueMonitoringPush(models.Model):
|
|
|
+ id = models.AutoField(primary_key=True, verbose_name=u'自增标记Id')
|
|
|
+ iccid = models.CharField(default='', max_length=32, verbose_name=u'完整的20位纯数字ICCID')
|
|
|
+ serial_no = models.CharField(default='', max_length=32, verbose_name=u'序列号')
|
|
|
+ sign = models.CharField(default='', max_length=32, verbose_name=u'验证签名')
|
|
|
+ time = models.CharField(default='', max_length=32, verbose_name=u'推送时间(yyyymmddhhmiss)')
|
|
|
+ type = models.CharField(default='', max_length=32, verbose_name=u'推送类型:DEVICE_QUEUE_MONITORING:设队列监控;')
|
|
|
+ current_renew_list_id = models.CharField(default='', max_length=32, verbose_name=u'队列ID')
|
|
|
+ no_queue_available = models.SmallIntegerField(default=0, verbose_name=u'是否无可用队列;1:是;0:否')
|
|
|
+ updated_time = models.IntegerField(default=0, verbose_name='更新时间')
|
|
|
+ created_time = models.IntegerField(default=0, verbose_name='创建时间')
|
|
|
+
|
|
|
+ class Meta:
|
|
|
+ db_table = 'unicom_device_queue_monitoring_push'
|
|
|
+ verbose_name = '联通设备队列监控推送表'
|
|
|
+ verbose_name_plural = verbose_name
|
|
|
+
|
|
|
+
|
|
|
+class UnicomDeviceStatusChangePush(models.Model):
|
|
|
+ id = models.AutoField(primary_key=True, verbose_name=u'自增标记Id')
|
|
|
+ iccid = models.CharField(default='', max_length=32, verbose_name=u'完整的20位纯数字ICCID')
|
|
|
+ serial_no = models.CharField(default='', max_length=32, verbose_name=u'序列号')
|
|
|
+ sign = models.CharField(default='', max_length=32, verbose_name=u'验证签名')
|
|
|
+ time = models.CharField(default='', max_length=32, verbose_name=u'推送时间(yyyymmddhhmiss)')
|
|
|
+ # 变更类型: DEVICE_REAL_NAME_STATUS_CHANGE:实名状态变更;DEVICE_STATUS_CHANGE:设备状态变更;
|
|
|
+ type = models.CharField(default='', max_length=32, verbose_name=u'变更类型')
|
|
|
+ # 之前值:设备状态变更 1: 已激活;2: 可激活;3: 已停用;4: 已失效;5: 可测试;6: 库存;7: 已更换;8: 已清除;
|
|
|
+ previous_val = models.CharField(default='', max_length=32, verbose_name=u'之前值:')
|
|
|
+ # 当前值:设备状态变更 1:已激活;2:可激活;3:已停用;4:已失效;5:可测试;6:库存;7:已更换;8:已清除;
|
|
|
+ current_val = models.CharField(default='', max_length=32, verbose_name=u'当前值:')
|
|
|
+ reason = models.SmallIntegerField(default=0, verbose_name=u'变更原因编码:请查看【信息提示码】')
|
|
|
+ updated_time = models.IntegerField(default=0, verbose_name='更新时间')
|
|
|
+ created_time = models.IntegerField(default=0, verbose_name='创建时间')
|
|
|
+
|
|
|
+ class Meta:
|
|
|
+ db_table = 'unicom_device_status_change_push'
|
|
|
+ verbose_name = '联通设备状态变更推送表'
|
|
|
+ verbose_name_plural = verbose_name
|