model.py 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375
  1. from peewee import *
  2. from playhouse.pool import PooledMySQLDatabase
  3. database = PooledMySQLDatabase('yixue_test',
  4. user='yixue_test',
  5. password='Lai123',
  6. host='test.db.cxhy.cn',
  7. port=3307,
  8. max_connections=32,
  9. stale_timeout=5,
  10. timeout=5)
  11. class UnknownField(object):
  12. def __init__(self, *_, **__): pass
  13. class BaseModel(Model):
  14. class Meta:
  15. database = database
  16. class AreaInfo(BaseModel):
  17. hour = IntegerField(null=True)
  18. jingdu = FloatField(null=True)
  19. minute = IntegerField(null=True)
  20. qu = TextField(null=True)
  21. qu_pinyin = TextField(null=True)
  22. second = IntegerField(null=True)
  23. sheng = TextField(null=True)
  24. shi = TextField(null=True)
  25. shi_pinyin = TextField(null=True)
  26. weidu = FloatField(null=True)
  27. class Meta:
  28. table_name = 'AreaInfo'
  29. class XingGe(BaseModel):
  30. key = TextField(null=True)
  31. level = IntegerField(null=True)
  32. low = TextField()
  33. middle = TextField(null=True)
  34. strong = TextField(null=True)
  35. class Meta:
  36. table_name = 'XingGe'
  37. class CustomUser(BaseModel):
  38. name = TextField(null=True)
  39. online = IntegerField(null=True)
  40. psd = TextField(null=True)
  41. sexy = IntegerField(null=True)
  42. user = TextField(null=True)
  43. class Meta:
  44. table_name = 'custom_user'
  45. class Dashe(BaseModel):
  46. dizhi = TextField(null=True)
  47. rigan = TextField(null=True)
  48. tiangan = TextField(null=True)
  49. class Meta:
  50. table_name = 'dashe'
  51. class Diwang(BaseModel):
  52. dizhi = TextField(null=True)
  53. nianzhi = TextField(null=True)
  54. rizhi = TextField(null=True)
  55. class Meta:
  56. table_name = 'diwang'
  57. class Dizhi(BaseModel):
  58. gan1 = TextField(null=True)
  59. gan2 = TextField(null=True)
  60. gan3 = TextField(null=True)
  61. name = TextField()
  62. wuxing = TextField()
  63. yinyang_dz = TextField()
  64. yuefen = IntegerField()
  65. class Meta:
  66. table_name = 'dizhi'
  67. class GaonengMid(BaseModel):
  68. arg1 = TextField(null=True)
  69. arg2 = TextField(null=True)
  70. arg3 = TextField(null=True)
  71. desc = TextField(null=True)
  72. fangxiang = TextField(null=True)
  73. father = TextField(null=True)
  74. guanxi = TextField(null=True)
  75. hehua = TextField(null=True)
  76. leibie = TextField(null=True)
  77. tip = TextField(null=True)
  78. wuxing1 = TextField(null=True)
  79. wuxing2 = TextField(null=True)
  80. wuxing3 = TextField(null=True)
  81. class Meta:
  82. table_name = 'gaoneng_mid'
  83. class Huagai(BaseModel):
  84. dizhi = TextField(null=True)
  85. nianzhi = TextField(null=True)
  86. rizhi = TextField(null=True)
  87. class Meta:
  88. table_name = 'huagai'
  89. class Liuqin(BaseModel):
  90. guanxi1 = TextField(null=True)
  91. guanxi2 = TextField(null=True)
  92. qiankun = TextField(null=True)
  93. shishen = TextField(null=True)
  94. class Meta:
  95. table_name = 'liuqin'
  96. class LuckyDay(BaseModel):
  97. day = IntegerField(null=True)
  98. desc = TextField(null=True)
  99. jiedu1 = TextField(null=True)
  100. jiedu2 = TextField(null=True)
  101. jiedu3 = TextField(null=True)
  102. jiedu4 = TextField(null=True)
  103. jiedu5 = TextField(null=True)
  104. month = IntegerField(null=True)
  105. riyuan = TextField(null=True)
  106. tip = TextField(null=True)
  107. year = IntegerField(null=True)
  108. class Meta:
  109. table_name = 'lucky_day'
  110. class LushenTip(BaseModel):
  111. key = TextField(null=True)
  112. tip = TextField(null=True)
  113. class Meta:
  114. table_name = 'lushen_tip'
  115. class ShenshaTips(BaseModel):
  116. effects = TextField(null=True)
  117. shensha = TextField(null=True)
  118. tips = TextField(null=True)
  119. class Meta:
  120. table_name = 'shensha_tips'
  121. class Shishen(BaseModel):
  122. guanxi = TextField()
  123. jiancheng = TextField()
  124. ta = TextField()
  125. ta_wu_xing = TextField(column_name='taWuXing')
  126. wo = TextField()
  127. wo_wu_xing = TextField(column_name='woWuXing')
  128. class Meta:
  129. table_name = 'shishen'
  130. class ShishenGeju(BaseModel):
  131. eft = TextField(null=True)
  132. key = TextField(null=True)
  133. solve = TextField(null=True)
  134. class Meta:
  135. table_name = 'shishen_geju'
  136. class ShishenJiedu(BaseModel):
  137. arg1 = TextField(null=True)
  138. arg2 = TextField(null=True)
  139. guanxi = TextField(null=True)
  140. tip1 = TextField(null=True)
  141. tip2 = TextField()
  142. tip3 = TextField(null=True)
  143. tip4 = TextField(null=True)
  144. tip5 = TextField(null=True)
  145. class Meta:
  146. table_name = 'shishen_jiedu'
  147. class ShishenShehuiguanxi(BaseModel):
  148. guanxi = TextField(null=True)
  149. shishen = TextField(null=True)
  150. class Meta:
  151. table_name = 'shishen_shehuiguanxi'
  152. class ShishenZhenjia(BaseModel):
  153. jia = TextField(null=True)
  154. key = TextField(null=True)
  155. zhen = TextField(null=True)
  156. class Meta:
  157. table_name = 'shishen_zhenjia'
  158. class Shishenzhilu(BaseModel):
  159. dizhi = TextField(null=True)
  160. tiangan = TextField(null=True)
  161. class Meta:
  162. table_name = 'shishenzhilu'
  163. class Taiyangpianyi(BaseModel):
  164. day = IntegerField(null=True)
  165. diff = IntegerField(null=True)
  166. month = IntegerField(null=True)
  167. class Meta:
  168. table_name = 'taiyangpianyi'
  169. class Taohua(BaseModel):
  170. dizhi = TextField(null=True)
  171. nianzhi = TextField(null=True)
  172. rizhi = TextField(null=True)
  173. class Meta:
  174. table_name = 'taohua'
  175. class Tiangan(BaseModel):
  176. banlu1 = TextField(null=True)
  177. banlu2 = TextField(null=True)
  178. diwang = TextField()
  179. linguan = TextField()
  180. lushen = TextField()
  181. name = TextField()
  182. wenchang = TextField()
  183. wuxing = TextField()
  184. yinyang = TextField()
  185. class Meta:
  186. table_name = 'tiangan'
  187. class Tianyiguiren(BaseModel):
  188. dizhi = TextField(null=True)
  189. niangan = TextField(null=True)
  190. rigan = TextField(null=True)
  191. class Meta:
  192. table_name = 'tianyiguiren'
  193. class ZaneTest(BaseModel):
  194. a = IntegerField(null=True)
  195. class Meta:
  196. table_name = "zane_test"
  197. class UserInfo(BaseModel):
  198. beizhu = TextField(null=True)
  199. customer = TextField(null=True)
  200. day = IntegerField(null=True)
  201. enabled = IntegerField(null=True)
  202. hour = IntegerField(null=True)
  203. join_time = TextField(column_name='joinTime', null=True)
  204. leibie = IntegerField(null=True)
  205. man = IntegerField(null=True)
  206. minute = IntegerField(null=True)
  207. month = IntegerField(null=True)
  208. name = TextField(null=True)
  209. niangan = TextField(null=True)
  210. nianzhi = TextField(null=True)
  211. qu = TextField(null=True)
  212. rigan = TextField(null=True)
  213. rizhi = TextField(null=True)
  214. sheng = TextField(null=True)
  215. shi = TextField(null=True)
  216. shigan = TextField(null=True)
  217. shizhi = TextField(null=True)
  218. year = IntegerField(null=True)
  219. yuegan = TextField(null=True)
  220. yuezhi = TextField(null=True)
  221. class Meta:
  222. table_name = 'user_info'
  223. class Wannianli(BaseModel):
  224. nian = IntegerField()
  225. nian_gan = TextField(null=True)
  226. nian_zhi = TextField(null=True)
  227. ri = IntegerField()
  228. ri_gan = TextField(null=True)
  229. ri_zhi = TextField(null=True)
  230. yue = IntegerField()
  231. yue_gan = TextField(null=True)
  232. yue_zhi = TextField(null=True)
  233. class Meta:
  234. table_name = 'wannianli'
  235. class WannianliJieqi(BaseModel):
  236. bailu = TextField()
  237. chuxi = TextField()
  238. daxue = TextField()
  239. hanlu = TextField()
  240. jingzhe = TextField()
  241. lichun = TextField()
  242. lidong = TextField()
  243. liqiu = TextField()
  244. lixia = TextField()
  245. mangzhong = TextField()
  246. nianfen = IntegerField()
  247. qingming = TextField()
  248. xiaohan = TextField()
  249. xiaoshu = TextField()
  250. class Meta:
  251. table_name = 'wannianli_jieqi'
  252. class Wuxing(BaseModel):
  253. desc1 = TextField(null=True)
  254. desc2 = TextField(null=True)
  255. effect1 = FloatField(null=True)
  256. effect2 = FloatField(null=True)
  257. guanxi = TextField(null=True)
  258. wuxing1 = TextField(null=True)
  259. wuxing2 = TextField(null=True)
  260. class Meta:
  261. table_name = 'wuxing'
  262. class Yima(BaseModel):
  263. chong = TextField(null=True)
  264. dizhi = TextField(null=True)
  265. sanhe = TextField(null=True)
  266. shoushen = TextField(null=True)
  267. class Meta:
  268. table_name = 'yima'
  269. class Zaisha(BaseModel):
  270. dizhi = TextField(null=True)
  271. nianzhi = TextField(null=True)
  272. rizhi = TextField(null=True)
  273. class Meta:
  274. table_name = 'zaisha'
  275. class Zhangsheng(BaseModel):
  276. dizhi = TextField(null=True)
  277. tiangan = TextField(null=True)
  278. zhangsheng = TextField(null=True)
  279. class Meta:
  280. table_name = 'zhangsheng'