slot.go 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  1. package model
  2. // TSlotWeightGroups [...]
  3. type TSlotWeightGroups struct {
  4. Id int64 `db:"id" json:"id"`
  5. Name string `db:"name" json:"name"`
  6. Gids string `db:"gids" json:"gids"`
  7. }
  8. // TableName get sql table name.获取数据库表名
  9. func (TSlotWeightGroups) TableName() string {
  10. return "crazygod_api_config.t_slot_weight_groups"
  11. }
  12. type SlotWeightGroups struct {
  13. Id int64 `json:"id"`
  14. Name string `json:"name"`
  15. SsGroup
  16. }
  17. // TSlotWeightGroupsConfig [...]
  18. type TSlotWeightGroupsConfig struct {
  19. Id int64 `db:"id" json:"id"`
  20. Gid int64 `db:"gid" json:"gid"`
  21. LevelId int64 `db:"levelId" json:"levelId"` // 岛id 【每个岛一个配置】
  22. SlotProb []SlotWeightGroupsProb `db:"slotpro" json:"slotpro"` // 概率 json
  23. UpdateDesc string `db:"update_desc" json:"update_desc"` // 最后修改者 时间 名字
  24. }
  25. // TableName get sql table name.获取数据库表名
  26. func (TSlotWeightGroupsConfig) TableName() string {
  27. return "crazygod_api_config.t_slot_weight_groups_config"
  28. }
  29. type SlotWeightGroupsProb struct {
  30. Id int64 `json:"id"`
  31. Type int64 `json:"type"`
  32. Prize string `json:"prize"`
  33. V int64 `json:"v"`
  34. RewardId int64 `json:"rewardId,omitempty"`
  35. }
  36. // TSlotWeightChangeConfig [...]
  37. type TSlotWeightChangeConfig struct {
  38. Type string `db:"type" json:"type"` // 类型
  39. Config string `db:"config" json:"config"` // 配置json
  40. }
  41. // TableName get sql table name.获取数据库表名
  42. func (TSlotWeightChangeConfig) TableName() string {
  43. return "crazygod_api_config.t_slot_weight_change_config"
  44. }
  45. type SlotWeightChangeConf struct {
  46. BetSpinsRule []SlotBetSpinsRule `json:"betSpinsRule"`
  47. SlotLimitDay []SlotCoefficient `json:"slotLimitDay"`
  48. SpinsLost []SlotCoefficient `json:"spinsLost"`
  49. SpinsLostDay []SlotCoefficient `json:"spinsLostDay"`
  50. }
  51. type SlotBetSpinsRule struct {
  52. Bet int64 `json:"bet"`
  53. Spins int64 `json:"spins"`
  54. }
  55. type SlotCoefficient struct {
  56. Main float64 `json:"main"`
  57. Coefficient []string `json:"coefficient"`
  58. }
  59. type SlotWeightAmendReq struct {
  60. Type string `json:"type"`
  61. Conf string `json:"conf"`
  62. }
  63. type SlotProbInterveneConf struct {
  64. CeProb []SlotCeProbConf `json:"ceProb"`
  65. LsConf []SlotLsConf `json:"lsConf"`
  66. }
  67. type SlotCeProbConf struct {
  68. Ce int64 `json:"ce"`
  69. Conf SlotCeProb `json:"conf"`
  70. }
  71. type SlotCeProb struct {
  72. One int64 `json:"one"`
  73. Two int64 `json:"two"`
  74. Three int64 `json:"three"`
  75. OneCoin int64 `json:"oneCoin"`
  76. }
  77. type SlotLsConf struct {
  78. SLv int64 `json:"s_lv"`
  79. ELv int64 `json:"e_lv"`
  80. Conf []SlotCeConf `json:"conf"`
  81. }
  82. type SlotCeConf struct {
  83. SSp int64 `json:"s_sp"`
  84. ESp int64 `json:"e_sp"`
  85. Ce int64 `json:"ce"`
  86. }
  87. type SlotStealResultConf struct {
  88. StealRetWeight []SlotStealRetWeightConf `json:"stealRetWeight"`
  89. BoxRetWeight []SlotBoxRetWeightConf `json:"boxRetWeight"`
  90. BetRetWeight []SlotBetRetWeightConf `json:"betRetWeight"`
  91. BetBoxRetWeight []SlotBetRetWeightConf `json:"betBoxRetWeight"`
  92. }
  93. type SlotStealRetWeightConf struct {
  94. Id int64 `json:"id"`
  95. Slv int64 `json:"slv"`
  96. Elv int64 `json:"elv"`
  97. Weight SlotStealWeight `json:"weight"`
  98. }
  99. type SlotStealWeight struct {
  100. A float64 `json:"a"`
  101. B float64 `json:"b"`
  102. C float64 `json:"c"`
  103. D float64 `json:"d"`
  104. }
  105. type SlotBoxRetWeightConf struct {
  106. Id int64 `json:"id"`
  107. Weight SlotStealWeight `json:"weight"`
  108. }
  109. type SlotBetRetWeightConf struct {
  110. Id int64 `json:"id"`
  111. Bet int64 `json:"bet"`
  112. Coefficient SlotStealWeight `json:"coefficient"`
  113. }
  114. type SlotStealRatioConf struct {
  115. Id int64 `json:"id"`
  116. Bet float64 `json:"bet"`
  117. FWeight int64 `json:"f_weight"`
  118. Weight int64 `json:"weight"`
  119. IsRobot int64 `json:"isRobot"`
  120. }
  121. type SlotStealFloorConf struct {
  122. MulSpend []SlotMulSpend `json:"mulSpend"`
  123. }
  124. type SlotMulSpend struct {
  125. Mul int64 `json:"mul"`
  126. Spend int64 `json:"spend"`
  127. }
  128. type SlotStealCoin struct {
  129. LevelId int64 `json:"levelId"`
  130. MaxCoin int64 `json:"maxCoin"`
  131. }
  132. type SlotStealCoinShow struct {
  133. LvRange
  134. MaxCoin int64 `json:"maxCoin"`
  135. }
  136. type SlotAttackConf struct {
  137. RandFriendLimit int64 `json:"rand_friend_limit"`
  138. FriendWeight int64 `json:"friend_weight"`
  139. GrowWeight int64 `json:"grow_weight"`
  140. UserLevel int64 `json:"user_level"`
  141. RobotShieldWeight int64 `json:"robot_shield_weight"`
  142. }
  143. // TAttackCoinConf [...]
  144. type TAttackCoinConf struct {
  145. LevelId int64 `db:"levelId" json:"levelId"`
  146. SlotAttackCoin
  147. }
  148. // TableName get sql table name.获取数据库表名
  149. func (TAttackCoinConf) TableName() string {
  150. return "crazygod_api_config.t_attack_coin_config"
  151. }
  152. type SlotAttackCoinShow struct {
  153. LvRange
  154. SlotAttackCoin
  155. }
  156. type SlotAttackCoin struct {
  157. Shield int64 `db:"shield" json:"shield"`
  158. NoShield int64 `db:"no_shield" json:"no_shield"`
  159. }
  160. type SlotSpinsFloorConf struct {
  161. Rand SlotSpinsFloorRand `json:"rand"`
  162. SlotStealFloorConf
  163. }
  164. type SlotSpinsFloorRand struct {
  165. Min float64 `json:"min"`
  166. Max float64 `json:"max"`
  167. }
  168. type SlotBankBasicShow struct {
  169. BasicConf SlotBankBasicConf `json:"basicConf"`
  170. SkinOptions []Option2 `json:"skinOptions"`
  171. }
  172. type SlotBankBasicConf struct {
  173. IsOpen int64 `json:"isOpen"`
  174. SpinsPotStartLevel int64 `json:"spinsPotStartLevel"`
  175. SpinsPotReBuyDay int64 `json:"spinsPotReBuyDay"`
  176. ShowTimes int64 `json:"showTimes"`
  177. ResourceDir string `json:"resourceDir"`
  178. }
  179. // TSpinsPotBasicConfig [...]
  180. type TSpinsPotBasicConfig struct {
  181. LevelId int64 `db:"levelId" json:"levelId"` // 等级ID
  182. SlotSpinsPotLvRange // 等级范围
  183. SlotSpinsPotGoodsConf // 商品配置
  184. }
  185. // TableName get sql table name.获取数据库表名
  186. func (TSpinsPotBasicConfig) TableName() string {
  187. return "crazygod_api_config.t_spins_pot_basic_config"
  188. }
  189. type SlotSpinsPotLvRange struct {
  190. StartLv int64 `db:"startlv" json:"startlv"` // 起始等级
  191. EndLv int64 `db:"endlv" json:"endlv"` // 结束等级
  192. }
  193. type SlotSpinsPotGoodsConf struct {
  194. FirstCfg SlotSpinsPotGoods `db:"firstcfg" json:"firstcfg"` // 未购买状态
  195. AgainCfg SlotSpinsPotGoods `db:"againcfg" json:"againcfg"` // 回购状态
  196. LongTimeCfg SlotSpinsPotGoods `db:"longtimecfg" json:"longtimecfg"` // 回购N天状态
  197. }
  198. type SlotSpinsPotGoods struct {
  199. MaxNum int64 `json:"maxNum"`
  200. Price float64 `json:"price"`
  201. Sku string `json:"sku"`
  202. }
  203. // TSpinsPotProbabilityConfig [...]
  204. type TSpinsPotProbabilityConfig struct {
  205. LevelId int64 `db:"levelId" json:"levelId"` // 等级id
  206. Config SlotSpinsPotProbConf `db:"config" json:"config"` // 配置信息
  207. }
  208. // TableName get sql table name.获取数据库表名
  209. func (TSpinsPotProbabilityConfig) TableName() string {
  210. return "crazygod_api_config.t_spins_pot_probability_config"
  211. }
  212. type SlotSpinsPotProbConf struct {
  213. LevelId int64 `json:"levelId"`
  214. SlotSpinsPotProb
  215. }
  216. type SlotSpinsPotProb struct {
  217. WeightOne int64 `json:"weightOne"`
  218. ScoreOne int64 `json:"scoreOne"`
  219. WeightTwo int64 `json:"weightTwo"`
  220. ScoreTwo int64 `json:"scoreTwo"`
  221. }
  222. type SlotSpinsPotProbShow struct {
  223. LvRange
  224. SlotSpinsPotProb
  225. }