蛋蛋星球 后台端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

md_basic.go 12 KiB

2 weeks ago
2 weeks ago
2 weeks ago
2 weeks ago
1 month ago
2 weeks ago
1 month ago
2 weeks ago
2 weeks ago
1 month ago
1 month ago
1 month ago
1 month ago
2 weeks ago
2 weeks ago
2 weeks ago
2 weeks ago
1 month ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. package md
  2. import (
  3. "code.fnuoos.com/EggPlanet/egg_system_rules.git/rule/egg_energy/md"
  4. )
  5. const (
  6. ExecutionInterval = 10 // 结算执行间隔
  7. )
  8. type VirtualCoin struct {
  9. Id int `json:"id" `
  10. Name string `json:"name" ` // 名称
  11. ExchangeRatio string `json:"exchange_ratio" example:"兑换比例(与金额)"` // 兑换比例(与金额)
  12. IsUse int `json:"is_use" ` // 是否开启: 0否 1是
  13. CreateAt string `json:"create_at" `
  14. UpdateAt string `json:"update_at" `
  15. }
  16. // BasicSetting 基础设置
  17. type BasicSetting struct {
  18. IsOpen int `json:"is_open" ` // 是否开启(1:开启 0:关闭)
  19. InitialPrice string `json:"initial_price" ` // 初始价格
  20. PersonEggEnergyCoinId int `json:"person_egg_energy_coin_id" ` // 个人蛋蛋能量对应虚拟币 id
  21. TeamEggEnergyCoinId int `json:"team_egg_energy_coin_id" ` // 团队蛋蛋能量对应虚拟币 id
  22. PersonEggPointsCoinId int `json:"person_egg_points_coin_id" ` // 个人蛋蛋积分对应虚拟币 id
  23. TeamEggPointsCoinId int `json:"team_egg_points_coin_id" ` // 团队蛋蛋积分对应虚拟币 id
  24. DirectPushReward md.DirectPushRewardSettingStruct `json:"direct_push_reward"` // 直推奖励
  25. }
  26. // VideoRewardSetting 视频奖励
  27. type VideoRewardSetting struct {
  28. VideoRewardIsOpen int `json:"video_reward_is_open" ` // 视频奖励是否开启(1:开启 0:关闭)
  29. VideoRewardSystem md.VideoRewardSystemStruct `json:"video_reward_system"` // 视频奖励机制
  30. }
  31. // DataSetting 数据设置
  32. type DataSetting struct {
  33. TotalIssuanceAmount string `json:"total_issuance_amount" example:"总发行量"` // 总发行量
  34. TotalTechnologyTeam string `json:"total_technology_team" example:"技术团队"` // 技术团队
  35. TotalAngelInvestor string `json:"total_angel_investor" example:"天使投资人"` // 天使投资人
  36. TotalOperateFund string `json:"total_operate_fund" example:"运营资金"` // 运营资金
  37. TotalEcologicalDevelopment string `json:"total_ecological_development" example:"当前价格"` // 生态建设
  38. TotalTeamDividends string `json:"total_team_dividends" example:"团队分红"` // 团队分红
  39. TotalUserForPerson string `json:"total_user_for_person" example:"个人区域"` // 个人区域
  40. TotalUserForTeam string `json:"total_user_for_team" example:"团队区域"` // 团队区域
  41. }
  42. type GetEggEnergyBasicResp struct {
  43. BasicSetting BasicSetting `json:"basic_setting"` // 基础设置
  44. VideoRewardSetting VideoRewardSetting `json:"video_reward_setting"` // 视频奖励
  45. DataSetting DataSetting `json:"data_setting"` // 数据设置
  46. DestructionSetting md.DestructionSettingStruct `json:"destruction_setting"` // 销毁设置
  47. PriceSetting md.PriceSettingStruct `json:"price_setting"` // 价格设置
  48. ExchangeRules md.ExchangeRulesStruct `json:"exchange_rules"` // 兑换规则
  49. RewardSystem []md.RewardSystemStruct `json:"reward_system"` // 圈层奖励
  50. NewUserIncentiveRules md.NewUserRewardRules `json:"new_user_incentive_rules"` // 新用户奖励规则
  51. SystemID int `json:"system_id"` // 该设置系统 ID
  52. SettlementQuantity int `json:"settlement_quantity"` // 结算数量(百分比)
  53. }
  54. type UpdateEggEnergyBasicReq struct {
  55. SystemID int `json:"system_id,required"` // 该设置系统 ID
  56. BasicSetting BasicSetting `json:"basic_setting"` // 基础设置
  57. VideoRewardSetting VideoRewardSetting `json:"video_reward_setting"` // 视频奖励
  58. DataSetting DataSetting `json:"data_setting"` // 数据设置
  59. DestructionSetting md.DestructionSettingStruct `json:"destruction_setting"` // 销毁设置
  60. PriceSetting md.PriceSettingStruct `json:"price_setting"` // 价格设置
  61. ExchangeRules md.ExchangeRulesStruct `json:"exchange_rules"` // 兑换规则
  62. RewardSystem []md.RewardSystemStruct `json:"reward_system"` // 圈层奖励
  63. NewUserIncentiveRules md.NewUserRewardRules `json:"new_user_incentive_rules"` // 新用户奖励规则 // 新用户奖励规则
  64. SettlementQuantity string `json:"settlement_quantity"` // 结算数量(百分比)
  65. }
  66. type AddVirtualCoinNode struct {
  67. Name string `json:"name"` // 名称
  68. ExchangeRatio string `json:"exchange_ratio"` // 兑换比例(与金额)
  69. IsUse int `json:"is_use" ` // 是否开启:0否 1是
  70. }
  71. type BatchAddVirtualCoinsReq struct {
  72. List []AddVirtualCoinNode `json:"list"` // 新增的货币列表
  73. }
  74. type UpdateVirtualCoinReq struct {
  75. Id int `json:"id"`
  76. Name string `json:"name"` // 名称
  77. ExchangeRatio string `json:"exchange_ratio"` // 兑换比例(与金额)
  78. IsUse int `json:"is_use"` // 是否开启:0否 1是
  79. }
  80. type DeleteVirtualCoinReq struct {
  81. Id int `json:"id"`
  82. }
  83. type VipEquitySettingNode struct {
  84. VipLevelID string `json:"vip_level_id"` // 会员等级ID
  85. VipLevelName string `json:"vip_level_name"` // 会员等级名称
  86. ExchangeAccountBalanceFee string `json:"exchange_account_balance_fee"` //兑换余额手续费
  87. DividendRatio string `json:"dividend_ratio"` //分红比例
  88. }
  89. type GetEggEnergyVipSettingResp struct {
  90. LevelList []map[string]interface{} `json:"level_list"` // 会员等级列表
  91. List []VipEquitySettingNode `json:"list"` // 会员权益设置
  92. }
  93. type AddEggEnergyVipSettingReq struct {
  94. VipLevelId string `json:"vip_level_id"` //会员等级ID
  95. ExchangeAccountBalanceFee string `json:"exchange_account_balance_fee"` //兑换余额手续费
  96. DividendRatio string `json:"dividend_ratio"` //分红比例
  97. }
  98. type UpdateVipEquitySettingNode struct {
  99. VipLevelID string `json:"vip_level_id"` // 会员等级ID
  100. ExchangeAccountBalanceFee string `json:"exchange_account_balance_fee"` //兑换余额手续费
  101. DividendRatio string `json:"dividend_ratio"` //分红比例
  102. }
  103. type UpdateEggEnergyVipSettingReq struct {
  104. List []UpdateVipEquitySettingNode `json:"list"` // 更新后数据
  105. }
  106. type GetEggCoreDataListResp struct {
  107. PlanetTotalValue string `json:"planet_total_value" example:"星球价值"` // 星球价值
  108. NowPrice string `json:"now_price" example:"当前价格"` // 当前价格
  109. NowEnergyTotalNums string `json:"now_energy_total_nums" example:"现行总量"` // 现行总量
  110. UserHoldTotalNums string `json:"user_hold_total_nums"` // 用户持有总量
  111. }
  112. type GetEggEnergyCoreDataResp struct {
  113. Id int `json:"id"`
  114. NowPrice string `json:"now_price"` // 当前价格
  115. PlanetTotalValue string `json:"planet_total_value"` // 星球总价值
  116. NowEnergyTotalNums string `json:"now_energy_total_nums"` // 现行总量
  117. MarketplaceMerchantNums string `json:"marketplace_merchant_nums"` // 市商数量
  118. MarketplaceMerchantFunds string `json:"marketplace_merchant_funds"` // 市商资金
  119. DevelopmentCommittee string `json:"development_committee"` // 发展委员会
  120. PublicWelfareAndCharity string `json:"public_welfare_and_charity"` // 公益慈善
  121. StarLevelDividends string `json:"star_level_dividends"` // 星级分红
  122. CommunityDividends string `json:"community_dividends"` // 社区分红
  123. DestructionQuantityNums string `json:"destruction_quantity_nums"` // 销毁数量
  124. }
  125. type UpdateEggEnergyCoreDataReq struct {
  126. Id int `json:"id"`
  127. NowPrice string `json:"now_price"` // 当前价格
  128. PlanetTotalValue string `json:"planet_total_value"` // 星球总价值
  129. NowEnergyTotalNums string `json:"now_energy_total_nums"` // 现行总量
  130. MarketplaceMerchantNums string `json:"marketplace_merchant_nums"` // 市商数量
  131. MarketplaceMerchantFunds string `json:"marketplace_merchant_funds"` // 市商资金
  132. DevelopmentCommittee string `json:"development_committee"` // 发展委员会
  133. PublicWelfareAndCharity string `json:"public_welfare_and_charity"` // 公益慈善
  134. StarLevelDividends string `json:"star_level_dividends"` // 星级分红
  135. CommunityDividends string `json:"community_dividends"` // 社区分红
  136. }
  137. type GetPriceCurveResp struct {
  138. XData []interface{} `json:"x_data"`
  139. YData []interface{} `json:"y_data"`
  140. }
  141. type GetFundDataListReq struct {
  142. Kind int `json:"kind"` // 数据类型
  143. StartAt string `json:"start_at" example:"开始时间"`
  144. EndAt string `json:"end_at" example:"结束时间"`
  145. Page int `json:"page,required"` // 页数
  146. Limit int `json:"limit,required" ` // 每页大小
  147. }
  148. type FundDataNode struct {
  149. SystemID int `json:"system_id"`
  150. Kind int `json:"kind" ` //种类(1:公司补贴 2:资方投资 3:市场期望)
  151. TotalAmount string `json:"total_amount" ` // 金额
  152. BalanceAmount string `json:"balance_amount" ` // 余额
  153. Hours int `json:"hours" ` // 时长
  154. BalanceTimes int `json:"balance_times" ` // 剩余执行次数
  155. Memo string `json:"memo" ` // 备注
  156. CreateAt string `json:"create_at" ` // 创建时间
  157. }
  158. type GetFundDataListResp struct {
  159. KindList []map[string]interface{} `json:"kind_list"` // 类型列表
  160. Paginate Paginate `json:"paginate"` // 分页数据
  161. List []FundDataNode `json:"list"` // 数据列表
  162. }
  163. type GetFundDataRecordListReq struct {
  164. SystemID int `json:"system_id,required"` // 数据在系统中的 ID
  165. Page int `json:"page,required"` // 页数
  166. Limit int `json:"limit,required"` // 页面大小
  167. }
  168. type FundDataRecordNode struct {
  169. TotalAmount string `json:"total_amount" ` // 金额
  170. BalanceAmount string `json:"balance_amount" ` // 余额
  171. BalanceTimes int `json:"balance_times" ` //剩余执行次数
  172. BeforePrice string `json:"before_price" ` // 执行前-价格
  173. AfterPrice string `json:"after_price" ` // 执行后-价格
  174. BeforePlanetTotalValue string `json:"before_planet_total_value" ` // 执行前-星球价值
  175. AfterPlanetTotalValue string `json:"after_planet_total_value" ` // 执行后-星球价值
  176. CreateAt string `json:"create_at" `
  177. }
  178. type GetFundDataRecordListResp struct {
  179. List []FundDataRecordNode `json:"list"`
  180. Paginate Paginate `json:"paginate"`
  181. }
  182. type GetFundDataRecordDataListReq struct {
  183. Kind int `json:"kind"` //种类(1:公司补贴 2:资方投资 3:市场期望)
  184. StartAt string `json:"start_at"`
  185. EndAt string `json:"end_at"`
  186. Page int `json:"page"`
  187. Limit int `json:"limit"`
  188. }
  189. type AddFundDataReq struct {
  190. Kind int `json:"kind,required"` // 种类(1:公司补贴 2:资方投资 3:市场期望)
  191. TotalAmount string `json:"total_amount,required"` // 金额
  192. Hours int `json:"hours,required"` // 时长(小时)
  193. Memo string `json:"memo" example:"备注"`
  194. Frequency int `json:"frequency"` // 频率(分钟)
  195. }