model.py 8.3 KB

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