feature_list_subscription.json 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. {
  2. "project_name": "AI语音应用-订阅支付系统",
  3. "base_config": {
  4. "backend_port": 3000,
  5. "frontend_port": 8080,
  6. "db_host": "localhost",
  7. "db_port": 3306,
  8. "auth_enabled": false
  9. },
  10. "design_overview": {
  11. "problem": "当前系统只有简单的包月/包年会员,没有token计费系统,无法精细控制资源消耗",
  12. "solution": "设计多层级套餐体系,结合包月订阅和token配额,实现精细化资源管理"
  13. },
  14. "pricing_plan": {
  15. "tiers": [
  16. {
  17. "id": 0,
  18. "name": "免费版",
  19. "price": 0,
  20. "price_monthly": 0,
  21. "price_yearly": 0,
  22. "description": "适合轻度体验",
  23. "features": [
  24. "每天3次生成",
  25. "每次最多2000字",
  26. "基础音色5种",
  27. "标准音质"
  28. ],
  29. "limits": {
  30. "daily_generations": 3,
  31. "per_generation_limit": 2000,
  32. "monthly_tokens": 10000,
  33. "voice_options": 5,
  34. "audio_quality": "standard"
  35. }
  36. },
  37. {
  38. "id": 1,
  39. "name": "基础版",
  40. "price": 9.9,
  41. "price_monthly": 9.9,
  42. "price_yearly": 99,
  43. "description": "适合日常使用",
  44. "recommended": false,
  45. "features": [
  46. "每月50000 Token",
  47. "每次最多10000字",
  48. "全部音色",
  49. "高清音质",
  50. "优先队列"
  51. ],
  52. "limits": {
  53. "daily_generations": -1,
  54. "per_generation_limit": 10000,
  55. "monthly_tokens": 50000,
  56. "voice_options": -1,
  57. "audio_quality": "high"
  58. }
  59. },
  60. {
  61. "id": 2,
  62. "name": "专业版",
  63. "price": 29.9,
  64. "price_monthly": 29.9,
  65. "price_yearly": 299,
  66. "description": "适合内容创作者",
  67. "recommended": true,
  68. "features": [
  69. "每月200000 Token",
  70. "每次最多50000字",
  71. "全部音色+定制音色",
  72. "无损音质",
  73. "VIP优先队列",
  74. "API访问"
  75. ],
  76. "limits": {
  77. "daily_generations": -1,
  78. "per_generation_limit": 50000,
  79. "monthly_tokens": 200000,
  80. "voice_options": -1,
  81. "audio_quality": "lossless",
  82. "api_access": true
  83. }
  84. },
  85. {
  86. "id": 3,
  87. "name": "旗舰版",
  88. "price": 99,
  89. "price_monthly": 99,
  90. "price_yearly": 999,
  91. "description": "适合企业用户",
  92. "recommended": false,
  93. "features": [
  94. "每年1000000 Token",
  95. "每次最多200000字",
  96. "全部功能",
  97. "专属技术支持",
  98. "批量处理",
  99. "团队管理"
  100. ],
  101. "limits": {
  102. "daily_generations": -1,
  103. "per_generation_limit": 200000,
  104. "monthly_tokens": -1,
  105. "yearly_tokens": 1000000,
  106. "voice_options": -1,
  107. "audio_quality": "lossless",
  108. "api_access": true,
  109. "batch_processing": true,
  110. "team_management": true
  111. }
  112. }
  113. ],
  114. "token_pricing": {
  115. "text_to_speech": 1,
  116. "per_char": 1
  117. }
  118. },
  119. "features": [
  120. {
  121. "id": 1,
  122. "description": "套餐系统-数据库模型扩展",
  123. "backend_test_steps": [
  124. "1. npx prisma db push - 验证数据库迁移",
  125. "2. curl http://localhost:3000/api/subscription/plans - 获取套餐列表",
  126. "3. 验证套餐数据显示正确"
  127. ],
  128. "frontend_test_steps": [
  129. "1. 打开订阅页面",
  130. "2. 验证4个套餐卡片显示",
  131. "3. 验证套餐价格和功能显示正确"
  132. ],
  133. "status": "pending",
  134. "passes": false
  135. },
  136. {
  137. "id": 2,
  138. "description": "套餐系统-套餐API接口",
  139. "backend_test_steps": [
  140. "1. curl http://localhost:3000/api/subscription/plans - 获取所有套餐",
  141. "2. curl http://localhost:3000/api/subscription/plans/1 - 获取单个套餐详情",
  142. "3. 验证套餐信息完整"
  143. ],
  144. "frontend_test_steps": [
  145. "1. 点击套餐卡片",
  146. "2. 验证套餐详情弹窗显示",
  147. "3. 验证套餐功能列表显示"
  148. ],
  149. "status": "pending",
  150. "passes": false
  151. },
  152. {
  153. "id": 3,
  154. "description": "Token系统-Token消耗记录表",
  155. "backend_test_steps": [
  156. "1. npx prisma db push - 创建TokenUsage表",
  157. "2. curl -X POST http://localhost:3000/api/subscription/usage - 记录token使用",
  158. "3. curl http://localhost:3000/api/subscription/usage - 获取token使用记录"
  159. ],
  160. "frontend_test_steps": [
  161. "1. 打开个人中心",
  162. "2. 查看Token使用记录",
  163. "3. 验证使用量统计显示"
  164. ],
  165. "status": "pending",
  166. "passes": false
  167. },
  168. {
  169. "id": 4,
  170. "description": "Token系统-Token余额查询",
  171. "backend_test_steps": [
  172. "1. curl http://localhost:3000/api/subscription/balance - 获取当前用户token余额",
  173. "2. 验证返回剩余token数量和配额",
  174. "3. curl http://localhost:3000/api/subscription/quota - 获取用户配额"
  175. ],
  176. "frontend_test_steps": [
  177. "1. 首页显示当前配额",
  178. "2. 创建页面显示剩余token",
  179. "3. 验证配额显示正确"
  180. ],
  181. "status": "pending",
  182. "passes": false
  183. },
  184. {
  185. "id": 5,
  186. "description": "Token系统-Token扣费逻辑",
  187. "backend_test_steps": [
  188. "1. curl -X POST http://localhost:3000/api/tts - 生成音频时验证token扣费",
  189. "2. 检查数据库TokenUsage表记录",
  190. "3. 验证token不足时的错误处理"
  191. ],
  192. "frontend_test_steps": [
  193. "1. 生成音频后查看Token消耗",
  194. "2. 验证使用量实时更新",
  195. "3. 验证余额不足提示"
  196. ],
  197. "status": "pending",
  198. "passes": false
  199. },
  200. {
  201. "id": 6,
  202. "description": "支付系统-支付宝集成",
  203. "backend_test_steps": [
  204. "1. 配置支付宝沙箱环境",
  205. "2. curl -X POST http://localhost:3000/api/payment/alipay - 创建支付宝订单",
  206. "3. 验证返回支付宝支付链接",
  207. "4. curl http://localhost:3000/api/payment/alipay/callback - 模拟回调"
  208. ],
  209. "frontend_test_steps": [
  210. "1. 选择基础版套餐",
  211. "2. 点击支付宝支付",
  212. "3. 验证跳转到支付宝页面"
  213. ],
  214. "status": "pending",
  215. "passes": false
  216. },
  217. {
  218. "id": 7,
  219. "description": "支付系统-微信支付集成",
  220. "backend_test_steps": [
  221. "1. 配置微信支付沙箱环境",
  222. "2. curl -X POST http://localhost:3000/api/payment/wechat - 创建微信支付订单",
  223. "3. 验证返回微信支付二维码",
  224. "4. curl http://localhost:3000/api/payment/wechat/callback - 模拟回调"
  225. ],
  226. "frontend_test_steps": [
  227. "1. 选择专业版套餐",
  228. "2. 点击微信支付",
  229. "3. 验证显示微信二维码"
  230. ],
  231. "status": "pending",
  232. "passes": false
  233. },
  234. {
  235. "id": 8,
  236. "description": "支付系统-支付回调处理",
  237. "backend_test_steps": [
  238. "1. 实现支付宝异步回调",
  239. "2. 实现微信支付异步回调",
  240. "3. 验证订单状态更新",
  241. "4. 验证会员状态和token配额更新"
  242. ],
  243. "frontend_test_steps": [
  244. "1. 支付完成后验证页面跳转",
  245. "2. 验证会员状态更新",
  246. "3. 验证Token配额更新"
  247. ],
  248. "status": "pending",
  249. "passes": false
  250. },
  251. {
  252. "id": 9,
  253. "description": "前端-订阅套餐页面",
  254. "backend_test_steps": [],
  255. "frontend_test_steps": [
  256. "1. 打开订阅页面 /pages/subscription/index",
  257. "2. 验证4个套餐卡片显示",
  258. "3. 点击套餐选择支付方式",
  259. "4. 验证支付流程完整"
  260. ],
  261. "status": "pending",
  262. "passes": false
  263. },
  264. {
  265. "id": 10,
  266. "description": "前端-Token使用记录页面",
  267. "backend_test_steps": [],
  268. "frontend_test_steps": [
  269. "1. 打开个人中心 /pages/user/index",
  270. "2. 查看Token余额和配额",
  271. "3. 查看Token使用历史",
  272. "4. 验证列表分页正常"
  273. ],
  274. "status": "pending",
  275. "passes": false
  276. },
  277. {
  278. "id": 11,
  279. "description": "前端-订单历史页面",
  280. "backend_test_steps": [],
  281. "frontend_test_steps": [
  282. "1. 打开订单历史 /pages/orders/index",
  283. "2. 验证订单列表显示",
  284. "3. 查看订单详情",
  285. "4. 验证订单状态标签"
  286. ],
  287. "status": "pending",
  288. "passes": false
  289. },
  290. {
  291. "id": 12,
  292. "description": "前端-套餐推荐和对比页面",
  293. "backend_test_steps": [],
  294. "frontend_test_steps": [
  295. "1. 打开订阅页面",
  296. "2. 验证套餐对比表显示",
  297. "3. 验证推荐标识正确",
  298. "4. 验证价格计算正确"
  299. ],
  300. "status": "pending",
  301. "passes": false
  302. }
  303. ]
  304. }