model.py 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374
  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. 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 ZaneTest(BaseModel):
  193. a = IntegerField(null=True)
  194. class Meta:
  195. table_name = "zane_test"
  196. class UserInfo(BaseModel):
  197. beizhu = TextField(null=True)
  198. customer = TextField(null=True)
  199. day = IntegerField(null=True)
  200. enabled = IntegerField(null=True)
  201. hour = IntegerField(null=True)
  202. join_time = TextField(column_name='joinTime', null=True)
  203. leibie = IntegerField(null=True)
  204. man = IntegerField(null=True)
  205. minute = IntegerField(null=True)
  206. month = IntegerField(null=True)
  207. name = TextField(null=True)
  208. niangan = TextField(null=True)
  209. nianzhi = TextField(null=True)
  210. qu = TextField(null=True)
  211. rigan = TextField(null=True)
  212. rizhi = TextField(null=True)
  213. sheng = TextField(null=True)
  214. shi = TextField(null=True)
  215. shigan = TextField(null=True)
  216. shizhi = TextField(null=True)
  217. year = IntegerField(null=True)
  218. yuegan = TextField(null=True)
  219. yuezhi = TextField(null=True)
  220. class Meta:
  221. table_name = 'user_info'
  222. class Wannianli(BaseModel):
  223. nian = IntegerField()
  224. nian_gan = TextField(null=True)
  225. nian_zhi = TextField(null=True)
  226. ri = IntegerField()
  227. ri_gan = TextField(null=True)
  228. ri_zhi = TextField(null=True)
  229. yue = IntegerField()
  230. yue_gan = TextField(null=True)
  231. yue_zhi = TextField(null=True)
  232. class Meta:
  233. table_name = 'wannianli'
  234. class WannianliJieqi(BaseModel):
  235. bailu = TextField()
  236. chuxi = TextField()
  237. daxue = TextField()
  238. hanlu = TextField()
  239. jingzhe = TextField()
  240. lichun = TextField()
  241. lidong = TextField()
  242. liqiu = TextField()
  243. lixia = TextField()
  244. mangzhong = TextField()
  245. nianfen = IntegerField()
  246. qingming = TextField()
  247. xiaohan = TextField()
  248. xiaoshu = TextField()
  249. class Meta:
  250. table_name = 'wannianli_jieqi'
  251. class Wuxing(BaseModel):
  252. desc1 = TextField(null=True)
  253. desc2 = TextField(null=True)
  254. effect1 = FloatField(null=True)
  255. effect2 = FloatField(null=True)
  256. guanxi = TextField(null=True)
  257. wuxing1 = TextField(null=True)
  258. wuxing2 = TextField(null=True)
  259. class Meta:
  260. table_name = 'wuxing'
  261. class Yima(BaseModel):
  262. chong = TextField(null=True)
  263. dizhi = TextField(null=True)
  264. sanhe = TextField(null=True)
  265. shoushen = TextField(null=True)
  266. class Meta:
  267. table_name = 'yima'
  268. class Zaisha(BaseModel):
  269. dizhi = TextField(null=True)
  270. nianzhi = TextField(null=True)
  271. rizhi = TextField(null=True)
  272. class Meta:
  273. table_name = 'zaisha'
  274. class Zhangsheng(BaseModel):
  275. dizhi = TextField(null=True)
  276. tiangan = TextField(null=True)
  277. zhangsheng = TextField(null=True)
  278. class Meta:
  279. table_name = 'zhangsheng'