models.py 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333
  1. # This is an auto-generated Django model module.
  2. # You'll have to do the following manually to clean this up:
  3. # * Rearrange models' order
  4. # * Make sure each model has one field with primary_key=True
  5. # * Make sure each ForeignKey and OneToOneField has `on_delete` set to the desired behavior
  6. # * Remove `managed = False` lines if you wish to allow Django to create, modify, and delete the table
  7. # Feel free to rename the models, but don't rename db_table values or field names.
  8. from django.db import models
  9. # This is an auto-generated Django model module.
  10. # You'll have to do the following manually to clean this up:
  11. # * Rearrange models' order
  12. # * Make sure each model has one field with primary_key=True
  13. # * Make sure each ForeignKey and OneToOneField has `on_delete` set to the desired behavior
  14. # * Remove `managed = False` lines if you wish to allow Django to create, modify, and delete the table
  15. # Feel free to rename the models, but don't rename db_table values or field names.
  16. from django.db import models
  17. class DogTransfer(models.Model):
  18. d_id = models.CharField(max_length=9, blank=True, null=True, db_comment='狗狗唯一id')
  19. sender_id = models.CharField(max_length=22, blank=True, null=True, db_comment='赠送者id')
  20. transfer_code = models.CharField(max_length=255, blank=True, null=True)
  21. expiry_time = models.DateTimeField(blank=True, null=True, db_comment='二维码过期时间')
  22. status = models.CharField(max_length=255, blank=True, null=True, db_comment='赠送中:pending,赠送完成:completed,赠送取消:cancelled,赠送失败:failed')
  23. receiver_id = models.CharField(max_length=22, blank=True, null=True, db_comment='接收者id')
  24. completed_time = models.DateTimeField(blank=True, null=True, db_comment='接收完成时间')
  25. cancelled_time = models.DateTimeField(blank=True, null=True, db_comment='取消时间')
  26. class Meta:
  27. managed = False
  28. db_table = 'dog_transfer'
  29. class DogBodyAttributes(models.Model):
  30. d_id = models.CharField(max_length=9, db_comment='狗id')
  31. curiosity = models.IntegerField(blank=True, null=True, db_comment='好奇心属性(初始值30-70,范围1-100)')
  32. iq = models.IntegerField(blank=True, null=True, db_comment='智商属性(初始值30-70,范围1-100)')
  33. runSpeed = models.IntegerField(blank=True, null=True, db_comment='跑步速度(初始值30-70,范围1-100)')
  34. jumpHeight = models.IntegerField(blank=True, null=True, db_comment='跳跃速度属性(初始值30-70,范围1-100)')
  35. liveliness = models.IntegerField(blank=True, null=True, db_comment='活泼度属性(初始值30-70,范围1-100)')
  36. agility = models.IntegerField(blank=True, null=True, db_comment='敏捷程度(初始值30-70,范围1-100)')
  37. obesity = models.IntegerField(blank=True, null=True, db_comment='肥胖程度(初始值30-70,范围1-100)')
  38. frisbeeSkill = models.IntegerField(blank=True, default=10,null=True, db_comment='叼飞盘熟练度(初始值10,范围1-100)')
  39. ballSkill = models.IntegerField(blank=True, default=10,null=True, db_comment='玩球熟练度(初始值10,范围1-100)')
  40. class Meta:
  41. managed = False
  42. db_table = 'dog_body_attributes'
  43. unique_together = (('id', 'd_id'),)
  44. class DogPersonalityRelationship(models.Model):
  45. d_id = models.CharField(max_length=9, db_comment='狗id')
  46. intimate = models.IntegerField(blank=True, null=True, db_comment='亲密度(初始值20-50,范围1-100)')
  47. friendly = models.IntegerField(blank=True, null=True, db_comment='对主人友善/恐惧(初始值25-50,范围1-100)')
  48. obedience = models.IntegerField(blank=True, null=True, db_comment='对主人服从性(初始值25-50,范围1-100)')
  49. friendlyToHost = models.IntegerField(blank=True, null=True, db_comment='对家人友好程度属性(初始值20-40,范围1-100)')
  50. friendlyToStranger = models.IntegerField(blank=True, null=True, db_comment='对陌生人友好程度(初始值25-50,范围1-100)')
  51. friendlyToOtherSSDog = models.IntegerField(blank=True, null=True, db_comment='对同性狗友好程度(初始值20-40,范围1-100)')
  52. friendlyToOtherDSDog = models.IntegerField(blank=True, null=True, db_comment='对异性别狗友好程度(初始值20-40,范围1-100)')
  53. class Meta:
  54. managed = False
  55. db_table = 'dog_personality_relationship'
  56. unique_together = (('id', 'd_id'),)
  57. class DogPersonalityRelationshipLog(models.Model):
  58. d_id = models.IntegerField(blank=True, null=True)
  59. owner_id = models.CharField(max_length=22, blank=True, null=True, db_comment='用户id')
  60. log_date = models.DateField(blank=True, null=True, db_comment='当日日期')
  61. intimate_count = models.IntegerField(blank=True, null=True, db_comment='亲密当日累计次数,属每次+1,每日最多+2')
  62. friendly_count = models.IntegerField(blank=True, null=True, db_comment='友善当日累计次数,属每次+1,每日最多+2')
  63. obedience_count = models.IntegerField(blank=True, null=True, db_comment='服从当日累计次数, 属性每次+1,每日最多+2')
  64. class Meta:
  65. managed = False
  66. db_table = 'dog_personality_relationship_log'
  67. class DogStatus(models.Model):
  68. id = models.IntegerField(primary_key=True) # The composite primary key (id, d_id) found, that is not supported. The first column is selected.
  69. d_id = models.CharField(max_length=9, db_comment='狗id')
  70. satiety = models.IntegerField(blank=True, default=50,null=True, db_comment='饥饿属性(初始值50,范围1-100)')
  71. happiness = models.IntegerField(blank=True,default=50, null=True, db_comment='快乐属性(初始值50,范围1-100))')
  72. stamina = models.IntegerField(blank=True, default=50,null=True, db_comment='体力属性(初始值50,范围1-100)')
  73. thirsty = models.IntegerField(blank=True, default=50,null=True, db_comment='口渴属性(初始值50,范围1-100)')
  74. healthy = models.IntegerField(blank=True, default=50,null=True, db_comment='健康属性(初始值50,范围1-100)')
  75. clean = models.IntegerField(blank=True, default=50,null=True, db_comment='干净属性(初始值50,范围1-100)')
  76. time_lasttime = models.DateTimeField(blank=True, null=True, db_comment='上次请求更新时间')
  77. class Meta:
  78. managed = False
  79. db_table = 'dog_status'
  80. unique_together = (('id', 'd_id'),)
  81. class DogTrainingNew(models.Model):
  82. d_id = models.CharField(max_length=9, db_comment='狗id')
  83. voicecommand = models.IntegerField(db_column='voiceCommand', default=0,blank=True, null=True, db_comment='训练能力(初始值1,范围1-100)') # Field name made lowercase.
  84. voicecall = models.IntegerField(db_column='voiceCall', default=0,blank=True, null=True, db_comment='识自己的名字能力(初始值1,范围1-100)') # Field name made lowercase.
  85. commandsit = models.IntegerField(db_column='commandSit', default=0,blank=True, null=True, db_comment='是否拥有识别坐的能力:拥有1,未获得:0') # Field name made lowercase.
  86. commandstand = models.IntegerField(db_column='commandStand', default=0,blank=True, null=True, db_comment='是否拥有识别站起的能力:拥有1,未获得:0') # Field name made lowercase.
  87. commandbark = models.IntegerField(db_column='commandBark', default=0,blank=True, null=True, db_comment='是否拥有识别吼人的能力:拥有1,未获得:0') # Field name made lowercase.
  88. commandliedown = models.IntegerField(db_column='commandLieDown', default=0,blank=True, null=True, db_comment='是否拥有识别吼人的能力:拥有1,未获得:0') # Field name made lowercase.
  89. commandshake = models.IntegerField(db_column='commandShake', default=0,blank=True, null=True, db_comment='是否拥有识别躺下的能力:拥有1,未获得:0') # Field name made lowercase.
  90. commandtouch = models.IntegerField(db_column='commandTouch', default=0,blank=True, null=True, db_comment='是否拥有识别拥抱的能力:拥有1,未获得:0') # Field name made lowercase.
  91. commanddeath = models.IntegerField(db_column='commandDeath', default=0,blank=True, null=True, db_comment='是否拥有识别装死的能力:拥有1,未获得:0') # Field name made lowercase.
  92. commandturnl = models.IntegerField(db_column='commandTurnL', default=0,blank=True, null=True, db_comment='是否拥有识别向左的能力:拥有1,未获得:0') # Field name made lowercase.
  93. commandturnr = models.IntegerField(db_column='commanTurnR',default=0, blank=True, null=True, db_comment='是否拥有识别向右的能力:拥有1,未获得:0') # Field name made lowercase.
  94. voicecallenable = models.IntegerField(db_column='voiceCallEnable',default=0, blank=True, null=True, db_comment='默认0,区别是否首次') # Field name made lowercase.
  95. voicecommandenable = models.IntegerField(db_column='voiceCommandEnable', default=0,blank=True, null=True, db_comment='默认0,区别是否首次') # Field name made lowercase.
  96. class Meta:
  97. managed = False
  98. db_table = 'dog_training_new'
  99. unique_together = (('id', 'd_id'),)
  100. class DogTrainingLog(models.Model):
  101. d_id = models.CharField(max_length=9, blank=True, null=True, db_comment='狗狗唯一id')
  102. owner_id = models.CharField(max_length=22, blank=True, null=True, db_comment='用户id')
  103. command_type = models.CharField(max_length=255, blank=True, null=True, db_comment='训练口令 类型')
  104. training_date = models.DateField(blank=True, null=True)
  105. training_count = models.IntegerField(blank=True, null=True, db_comment='当日训练次数')
  106. class Meta:
  107. managed = False
  108. db_table = 'dog_training_log'
  109. class DogTraining(models.Model):
  110. d_id = models.CharField(max_length=9, db_comment='狗id')
  111. frisbeeSkill = models.IntegerField(blank=True, default=10,null=True, db_comment='叼飞盘熟练度(初始值1,范围1-100)')
  112. ballSkill = models.IntegerField(blank=True,default=10, null=True, db_comment='玩球熟练度(初始值1,范围1-100)')
  113. commandName = models.IntegerField(blank=True, default=10,null=True, db_comment='识别自己的名字(初始值1,范围1-100)')
  114. commandSit = models.IntegerField(blank=True, default=10,null=True, db_comment='识别坐口令(初始值1,范围1-100)')
  115. commandLieDown = models.IntegerField(blank=True, default=10,null=True, db_comment='识别躺下口令(初始值1,范围1-100)')
  116. commandRotate = models.IntegerField(blank=True, default=10,null=True, db_comment='识别转圈口令(初始值1,范围1-100)')
  117. numbers_of_calls = models.IntegerField(blank=True, default=10,null=True, db_comment='呼唤次数,每日最多999')
  118. time_lasttime = models.DateTimeField(blank=True, null=True, db_comment='上次请求更新时间')
  119. class Meta:
  120. managed = False
  121. db_table = 'dog_training'
  122. unique_together = (('id', 'd_id'),)
  123. class Doginfo(models.Model):
  124. d_id = models.CharField(max_length=9, db_comment='狗狗唯一id')
  125. owner_id = models.CharField(max_length=22, db_comment='用户id')
  126. dog_name = models.CharField(max_length=10, blank=True, null=True, db_comment='狗的名字')
  127. sex = models.IntegerField(db_comment='狗的性别(母:0,公:1)')
  128. breed = models.CharField(max_length=10,blank=True, null=True, db_comment='狗的品种(1:哈士奇,2:阿拉斯加,3:柯基,4:沙皮,5:金毛))')
  129. birthday = models.DateTimeField(blank=True, null=True, db_comment='狗的生日')
  130. skin = models.CharField(max_length=22, db_comment='狗的皮肤')
  131. adoption = models.CharField(max_length=22, default='home', db_comment='领养状态:home 家养;fostered 寄养')
  132. transfer_status=models.IntegerField(blank=True,default=0, null=True, db_comment='转移状态:1(转移中),0(可转移)')
  133. class Meta:
  134. managed = False
  135. db_table = 'doginfo'
  136. unique_together = (('id', 'owner_id'),)
  137. class GroupIdList(models.Model):
  138. id = models.IntegerField(primary_key=True)
  139. group_id = models.CharField(max_length=255, blank=True, null=True, db_comment='以年月分组group_id,每月用户在同一组,初始化月份查表,无则创建groupid')
  140. class Meta:
  141. managed = False
  142. db_table = 'group_id_list'
  143. class LoginTokens(models.Model):
  144. login_token = models.CharField(max_length=255)
  145. created_at = models.DateTimeField(blank=True, null=True, db_comment='logintoken创建时间')
  146. uid = models.CharField(max_length=22)
  147. expires_at = models.DateTimeField(blank=True, null=True, db_comment='logintoken过期时间')
  148. class Meta:
  149. managed = False
  150. db_table = 'login_tokens'
  151. class AccessTokens(models.Model):
  152. uid = models.CharField(max_length=22, db_comment='用户id')
  153. access_token = models.CharField(max_length=255)
  154. created_at = models.DateTimeField(blank=True, null=True, db_comment='创建时间')
  155. expires_at = models.DateTimeField(db_comment='过期时间')
  156. class Meta:
  157. managed = False
  158. db_table = 'access_tokens'
  159. class InventoryInfo(models.Model):
  160. item_id = models.CharField(max_length=20,blank=True, null=True)
  161. item_name = models.CharField(max_length=100, blank=True, null=True, db_comment='道具名称')
  162. item_type = models.CharField(max_length=20, blank=True, null=True, db_comment='道具类型(食 物,玩具,其他)')
  163. price = models.IntegerField(blank=True, null=True, db_comment='价格(金币)')
  164. is_active = models.IntegerField(default=1,blank=True, null=True, db_comment='是否可购买(1可以,0不可 购买)')
  165. created_at = models.DateTimeField(auto_now_add=True,blank=True, null=True, db_comment='创建时间')
  166. updated_at = models.DateTimeField(auto_now=True,blank=True, null=True, db_comment='更新时间')
  167. description = models.TextField(blank=True, null=True, db_comment='道具描述')
  168. class Meta:
  169. managed = False
  170. db_table = 'inventory_info'
  171. class UserInventory(models.Model):
  172. item_id = models.CharField(max_length=22, blank=True, null=True, db_comment='道具id')
  173. owner_id = models.CharField(max_length=22, blank=True, null=True, db_comment='用户id')
  174. quantity = models.IntegerField(blank=True, default=0, null=True, db_comment='道具数量')
  175. class Meta:
  176. managed = False
  177. db_table = 'user_inventory'
  178. class User(models.Model):
  179. uid = models.CharField(max_length=22, db_comment='用户id')
  180. mobile = models.CharField(max_length=55, blank=True, null=True, db_comment='用户手机号')
  181. password = models.CharField(max_length=255, blank=True, null=True, db_comment='用户密码')
  182. uuid = models.CharField(max_length=22, blank=True, null=True, db_comment='手机串号')
  183. login_token = models.CharField(max_length=255, blank=True, null=True, db_comment='登录令牌7天有效')
  184. access_token = models.CharField(max_length=255, blank=True, null=True, db_comment='请求令牌1天有效')
  185. coin = models.IntegerField(blank=True, default=1000,null=True, db_comment='金币数量(初始值1000,范围10000000)')
  186. voice_feature_id = models.CharField(max_length=255, db_collation='utf8_general_ci', blank=True, null=True, db_comment='用户声纹特征id')
  187. voice_sit_command = models.TextField(blank=True, null=True, db_comment='用户“坐下”指令音频')
  188. voice_stand_command = models.TextField(blank=True, null=True, db_comment='用户“站起来”指令音频')
  189. voice_feature_info_param = models.CharField(max_length=255, db_collation='utf8_general_ci', blank=True, null=True, db_comment='用户声纹信息参数')
  190. voice_update_feature_info_param = models.CharField(max_length=255, db_collation='utf8_general_ci', blank=True, null=True, db_comment='用户更新声纹信息参数')
  191. registration_time = models.DateTimeField(blank=True, null=True, db_comment='用户注册时间')
  192. is_sit = models.IntegerField(blank=True, default=0,null=True, db_comment='是否坐下口令(是:1,否0)')
  193. is_stand = models.IntegerField(blank=True, default=1, null=True, db_comment='是否站起口令(是:1,否0)')
  194. isRegUser = models.IntegerField(blank=True, default=0,null=True, db_comment='是否为临时用户')
  195. email = models.CharField(max_length=22, blank=True, null=True, db_comment='英文用户登录使用')
  196. user_name = models.CharField(max_length=255, blank=True, null=True, db_comment='用户名')
  197. level = models.CharField(max_length=10, blank=True, default='basic',null=True, db_comment='用户等级')
  198. last_login_date = models.DateTimeField(blank=True, null=True, db_comment='用户最近一次登录时间')
  199. class Meta:
  200. managed = False
  201. db_table = 'user'
  202. class AidogFeedbacks(models.Model):
  203. feedback_id = models.IntegerField(primary_key=True, db_comment='反馈id自增')
  204. uid = models.CharField(blank=True, null=True, db_comment='用户id')
  205. create_time = models.DateTimeField(blank=True, null=True, db_comment='反馈时间')
  206. feedback_type = models.CharField(max_length=10, blank=True, null=True, db_comment='bug/comment')
  207. feedback_content = models.TextField(blank=True, null=True, db_comment='反馈内容')
  208. contact_info = models.CharField(max_length=100, blank=True, null=True, db_comment='联系方式')
  209. feedback_status = models.IntegerField(blank=True, null=True, db_comment='反馈记录状态(0:待理,1:已处理)')
  210. staff_id = models.CharField(max_length=22, blank=True, null=True, db_comment='处理人id')
  211. handle_time = models.DateTimeField(blank=True, null=True, db_comment='处理时间')
  212. handle_content = models.TextField(blank=True, null=True, db_comment='处理结果')
  213. class Meta:
  214. managed = False
  215. db_table = 'aidog_feedbacks'
  216. class VoiceFeatureInfo(models.Model):
  217. uid = models.CharField(max_length=22, db_comment='用户id')
  218. d_id = models.CharField(max_length=9, db_comment='狗狗唯一id')
  219. voice_group_id = models.CharField(blank=True, null=True, db_comment='声纹库id')
  220. voice_feature_id = models.CharField(max_length=250, blank=True, null=True, db_comment='每条声纹数据的声纹id')
  221. voice_feature_info_param = models.CharField(max_length=255, blank=True, null=True, db_comment='用户声纹信息参数')
  222. voice_update_feature_info_param = models.CharField(max_length=255, blank=True, null=True, db_comment='用户更新声纹信息参数')
  223. record_time = models.DateTimeField(blank=True, null=True, db_comment='用户录音时间')
  224. command_type = models.CharField(max_length=250,blank=True, null=True, db_comment='口令类型(voiceCall,voiceCommandSit,voiceCommandStand)')
  225. voice_path= models.CharField(max_length=250, blank=True, null=True, db_comment='本地音频存储路径')
  226. mfcc = models.TextField(blank=True, null=True, db_comment='本地音频算法取出的每个音频唯一mfcc特征值用于比对')
  227. class Meta:
  228. managed = False
  229. db_table = 'voice_feature_info'
  230. class VoiceCompareScores(models.Model):
  231. voice_feature_id = models.CharField(max_length=250, db_comment='声纹id')
  232. uid = models.CharField(max_length=22, blank=True, null=True, db_comment='用户id')
  233. keda_score = models.DecimalField(db_column='KEDA_score', max_digits=5, decimal_places=2, blank=True, null=True, db_comment='科大声纹比对得分') # Field name made lowercase.
  234. mfcc_score = models.DecimalField(db_column='MFCC_score', max_digits=5, decimal_places=2, blank=True, null=True, db_comment='本地声纹算法得分') # Field name made lowercase.
  235. kedacompare_spend_time = models.FloatField(db_column='KEDAcompare_spend_time', blank=True, null=True, db_comment='科 大比对消耗时间') # Field name made lowercase.
  236. mfcccompare_spend_time = models.FloatField(db_column='MFCCcompare_spend_time', blank=True, null=True, db_comment='本 地算法比对消耗时间') # Field name made lowercase.
  237. createtime = models.DateTimeField(blank=True, null=True, db_comment='创建时间')
  238. class Meta:
  239. managed = False
  240. db_table = 'voice_compare_scores'
  241. class WalkDogsScore(models.Model):
  242. uid = models.CharField(max_length=22, db_comment='用户id')
  243. d_id = models.CharField(max_length=9, blank=True, null=True, db_comment='狗id')
  244. score = models.IntegerField(blank=True, null=True, db_comment='遛狗得分')
  245. maxcombo = models.IntegerField(db_column='maxCombo', blank=True, null=True, db_comment='最大续击中') # Field name made lowercase.
  246. perfect = models.IntegerField(blank=True, null=True, db_comment='完美击中数量')
  247. good = models.IntegerField(blank=True, null=True, db_comment='不错击中数量')
  248. poor = models.IntegerField(blank=True, null=True, db_comment='较差击中数量')
  249. miss = models.IntegerField(blank=True, null=True, db_comment='错过击中数量')
  250. walk_time = models.DateTimeField(blank=True, null=True, db_comment='遛狗时间')
  251. walk_count = models.IntegerField(blank=True, null=True, db_comment='今日遛狗次数')
  252. class Meta:
  253. managed = False
  254. db_table = 'walk_dogs_score'
  255. class FrisbeeDogsScore(models.Model):
  256. uid = models.CharField(max_length=22, blank=True, null=True, db_comment='用户id')
  257. d_id = models.CharField(max_length=9, blank=True, null=True, db_comment='狗id')
  258. item_id = models.CharField(max_length=22, blank=True, null=True, db_comment='不同类型飞盘id')
  259. catch = models.IntegerField(blank=True, null=True, db_comment='true接到飞盘,false没有接到')
  260. distance = models.FloatField( blank=True, null=True, db_comment='丢飞盘距离')
  261. frisbee_time = models.DateTimeField(blank=True, null=True, db_comment='丢飞盘日期')
  262. frisbee_count = models.IntegerField(blank=True, null=True, db_comment='统计次数')
  263. class Meta:
  264. managed = False
  265. db_table = 'frisbee_dogs_score'