2.8 KiB
2.8 KiB
退费用户学习数据 - 数据模型参考
数据库连接
| 库名 | 用途 | 主机 | 端口 | 用户 | 密码来源 |
|---|---|---|---|---|---|
| vala_bi (PG) | BI统计表、同步表 | bj-postgres-16pob4sg.sql.tencentcdb.com | 28591 | ai_member | secrets.env → PG_ONLINE_PASSWORD |
| vala (PG) | 用户学习记录源表 | 同上 | 同上 | 同上 | 同上 |
核心表
订单相关 (vala_bi)
| 表名 | 说明 |
|---|---|
bi_vala_order |
订单表。order_status=3 已支付, order_status=4 已退款, pay_success_date 付款时间 |
bi_refund_order |
退费表。通过 out_trade_no 与订单关联, status=3 退费成功 |
bi_vala_app_account |
账号表。status=1 正常, status=2 测试账号 |
bi_vala_app_character |
角色表。account_id 关联账号, 一个账号可有多个角色 |
课时完成 (vala_bi)
| 表名 | 说明 |
|---|---|
bi_user_chapter_play_record_{0-7} |
课时游玩记录分表(按user_id%8)。play_status=1 完成, chapter_id 课时ID |
bi_level_unit_lesson |
课程结构映射表。id=chapter_id, 含 course_level/season/unit/lesson |
巩固 (vala_bi)
| 表名 | 说明 |
|---|---|
bi_user_unit_review_question_result |
课程巩固记录。chapter_id 课时, play_time 用时(ms), question_list JSON含isRight |
单元强化 (vala_bi)
| 表名 | 说明 |
|---|---|
bi_user_unit_summary_km_result |
强化练习记录。story_id 为 GameInfo.ID, km_type 知识模块类型(vocab/pron/sentence/grammar) |
单元挑战 (vala_bi)
| 表名 | 说明 |
|---|---|
bi_user_unit_challenge_question_result |
挑战记录。story_id GameInfo.ID, category 维度(listening/speaking/reading/writing), score_text 评分(Perfect/Good/Oops) |
完成记录 (vala库)
| 表名 | 说明 |
|---|---|
user_learn_record_report_summary_{3-7} |
学习完成汇总分表。learn_card_type=1,record_type=3 强化完成, learn_card_type=1,record_type=4 挑战完成 |
U0 关键ID映射
Chapter ID (课时)
| 等级 | 课时 | chapter_id |
|---|---|---|
| L1-U0 | L01~L05 | 343, 344, 345, 346, 348 |
| L2-U0 | L01~L05 | 55, 56, 57, 58, 59 |
Story ID (单元)
| 等级 | story_id |
|---|---|
| L1-U0 | 65 |
| L2-U0 | 8 |
知识模块
| 等级 | km_type 列表 | 总数 |
|---|---|---|
| L1-U0 | vocab, pron, sentence | 3 |
| L2-U0 | vocab, pron, sentence, grammar | 4 |
挑战维度
| 等级 | category 列表 |
|---|---|
| L1-U0 | listening, speaking |
| L2-U0 | listening, speaking, reading, writing |
课程结构映射公式
UnitIndex = (SeasonOfQuarter - 1) * 12 + GameInfo.IndexChapterIndex = UnitIndex * 5 + Chapter.Index- U0 对应
season_package_index = 0, unit_index = 0