model.py 8.9 KB

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