蛋蛋星球 后台端
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 9.7 KiB

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