AntiAddictionConfig.cs 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. using System.Collections.Generic;
  2. using LC.Newtonsoft.Json;
  3. namespace TapTap.AntiAddiction.Model
  4. {
  5. internal class ChildProtectedConfig
  6. {
  7. // 宵禁开始时间(作为可玩结束时间)
  8. [JsonProperty("night_strict_start")]
  9. internal string NightStrictStart { get; private set; }
  10. // 宵禁结束时间(作为可玩开始时间)
  11. [JsonProperty("night_strict_end")]
  12. internal string NightStrictEnd { get; private set; }
  13. }
  14. /// <summary>
  15. /// 充值限制
  16. /// </summary>
  17. internal class PayLimitTip
  18. {
  19. /// <summary>
  20. /// 账号类型
  21. /// </summary>
  22. [JsonProperty("account_type")]
  23. internal int AccountType { get; private set; }
  24. /// <summary>
  25. /// 单笔充值标题
  26. /// </summary>
  27. [JsonProperty("single_title")]
  28. internal string SingleTitle { get; private set; }
  29. /// <summary>
  30. /// 单笔充值描述
  31. /// </summary>
  32. [JsonProperty("single_description")]
  33. internal string SingleContent { get; private set; }
  34. /// <summary>
  35. /// 单笔充值限额
  36. /// </summary>
  37. [JsonProperty("single_limit")]
  38. internal int SingleLimit { get; private set; }
  39. /// <summary>
  40. /// 当月充值标题
  41. /// </summary>
  42. [JsonProperty("month_title")]
  43. internal string MonthTitle { get; private set; }
  44. /// <summary>
  45. /// 当月充值描述
  46. /// </summary>
  47. [JsonProperty("month_description")]
  48. internal string MonthContent { get; private set; }
  49. /// <summary>
  50. /// 当月充值限额
  51. /// </summary>
  52. [JsonProperty("month_limit")]
  53. internal int MonthLimit { get; private set; }
  54. }
  55. /// <summary>
  56. /// 输入身份信息
  57. /// </summary>
  58. internal class AuthIdentifyTip
  59. {
  60. /// <summary>
  61. /// 授权类型
  62. /// </summary>
  63. [JsonProperty("type")]
  64. internal int AuthIdentifyType { get; private set; }
  65. /// <summary>
  66. /// 标题
  67. /// </summary>
  68. [JsonProperty("title")]
  69. internal string Title { get; private set; }
  70. /// <summary>
  71. /// 内容
  72. /// </summary>
  73. [JsonProperty("description")]
  74. internal string Content { get; private set; }
  75. /// <summary>
  76. /// 否定按钮内容
  77. /// </summary>
  78. [JsonProperty("negative_button")]
  79. internal string NegativeButtonText { get; private set; }
  80. /// <summary>
  81. /// 否定按钮内容
  82. /// </summary>
  83. [JsonProperty("positive_button")]
  84. internal string PositiveButtonText { get; private set; }
  85. }
  86. /// <summary>
  87. /// 健康提示
  88. /// </summary>
  89. internal class HealthReminderTip
  90. {
  91. [JsonProperty("type")]
  92. internal int Type { get; set; }
  93. [JsonProperty("title")]
  94. internal string Title { get; set; }
  95. [JsonProperty("description")]
  96. internal string Content { get; set; }
  97. }
  98. internal class HealthReminderTips
  99. {
  100. [JsonProperty("account_type")]
  101. internal int AccountType { get; private set; }
  102. [JsonProperty("tips")]
  103. internal HealthReminderTip[] Tips { get; private set; }
  104. }
  105. internal class UIConfig
  106. {
  107. [JsonProperty("pay_limit_words")]
  108. internal PayLimitTip[] PayLimitTips { get; private set; }
  109. [JsonProperty("health_reminder_words")]
  110. internal HealthReminderTips[] HealthReminderTips { get; private set; }
  111. /// <summary>
  112. /// 支付限制时的按钮提醒
  113. /// </summary>
  114. [JsonProperty("pay_reminder")]
  115. internal PaymentInfo PaymentInfo { get; private set; }
  116. /// <summary>
  117. /// 身份授权消息
  118. /// </summary>
  119. [JsonProperty("auth_identify_words")]
  120. internal AuthIdentifyTip[] AuthIdentifyTips { get; private set; }
  121. /// <summary>
  122. /// 输入用户信息提示(越南防沉迷使用)
  123. /// </summary>
  124. [JsonProperty("input_realname_info")]
  125. internal InputRealNameInfo InputRealNameInfoVietnam { get; private set; }
  126. /// <summary>
  127. /// 健康提示(越南防沉迷使用)
  128. /// </summary>
  129. [JsonProperty("health_reminder")]
  130. internal HealReminderVietnam HealthReminderVietnam { get; private set; }
  131. }
  132. internal class UIPanelConfig
  133. {
  134. [JsonProperty("title")]
  135. public string title;
  136. [JsonProperty("description")]
  137. public string description;
  138. [JsonProperty("button")]
  139. public string button;
  140. }
  141. internal class PaymentInfo
  142. {
  143. [JsonProperty("button_confirm")]
  144. public string buttonConfirm;
  145. }
  146. internal class InputRealNameInfo : UIPanelConfig
  147. {
  148. [JsonProperty("submit_success_message")]
  149. public string submitSuccessMsg;
  150. [JsonProperty("birthdate_invalidate_message")]
  151. public string invalidateMessage;
  152. }
  153. internal class HealReminderVietnam
  154. {
  155. [JsonProperty("title")]
  156. public string title;
  157. [JsonProperty("description")]
  158. public string description;
  159. [JsonProperty("button_exit")]
  160. public string buttonExit;
  161. [JsonProperty("button_switch")]
  162. public string buttonSwitch;
  163. }
  164. public class AntiAddictionConfigResult
  165. {
  166. /// <summary>
  167. /// 应用名
  168. /// </summary>
  169. [JsonProperty("name")]
  170. internal string Name { get; private set; }
  171. [JsonProperty("child_protected_config")]
  172. internal ChildProtectedConfig ChildProtectedConfig { get; private set; }
  173. [JsonProperty("upload_user_action")]
  174. internal string UploadUserAction { get; private set; }
  175. [JsonProperty("ui_config")]
  176. internal UIConfig UIConfig { get; private set; }
  177. [JsonProperty("holiday")]
  178. internal List<string> Holidays { get; private set; }
  179. }
  180. internal class AntiAddictionConfigResponse : BaseResponse
  181. {
  182. [JsonProperty("data")]
  183. internal AntiAddictionConfigResult Result { get; private set; }
  184. }
  185. public class AntiAddictionConfig
  186. {
  187. [JsonProperty("gameId")]
  188. public string gameId;
  189. [JsonProperty("useTapLogin")]
  190. public bool useTapLogin;
  191. [JsonProperty("showSwitchAccount")]
  192. public bool showSwitchAccount = true;
  193. [JsonProperty("region")] public Region region = Region.China;
  194. //"g" means Displays the enumeration entry as a string value, if possible, and otherwise displays the integer value of the current instance.
  195. internal string regionStr => region.ToString("g").ToLower();
  196. }
  197. }