mm_dao 1.9.0 → 1.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (197) hide show
  1. package/README.md +11 -2
  2. package/index.js +3 -13
  3. package/lib/admin.js +24 -0
  4. package/lib/dao.js +38 -1219
  5. package/lib/dao_crud.js +379 -0
  6. package/lib/dao_fields.js +145 -0
  7. package/lib/dao_query.js +238 -0
  8. package/lib/dao_scope.js +203 -0
  9. package/lib/dao_stats.js +129 -0
  10. package/lib/dao_transfer.js +358 -0
  11. package/lib/manager.js +40 -18
  12. package/lib/script.tpl.js +4 -4
  13. package/package.json +70 -63
  14. package/tool/dao/index.js +176 -0
  15. package/tool/dao/tool.json +121 -0
  16. package/tool/dao_admin/index.js +36 -0
  17. package/tool/dao_admin/tool.json +11 -0
  18. package/db/mm/user_account/_meta.json +0 -54
  19. package/db/mm.db +0 -0
  20. package/eslint.config.js +0 -235
  21. package/example/index.js +0 -78
  22. package/test_db/dao_test_1785991977965/account/1.json +0 -6
  23. package/test_db/dao_test_1785991977965/account/2.json +0 -6
  24. package/test_db/dao_test_1785991977965/account/_meta.json +0 -18
  25. package/test_db/dao_test_1785991977965/role/1.json +0 -7
  26. package/test_db/dao_test_1785991977965/role/2.json +0 -7
  27. package/test_db/dao_test_1785991977965/role/3.json +0 -7
  28. package/test_db/dao_test_1785991977965/role/_meta.json +0 -18
  29. package/test_db/dao_test_1785991977965/tool/_meta.json +0 -18
  30. package/test_db/dao_test_1785991977965/tool/bow_001.json +0 -8
  31. package/test_db/dao_test_1785991977965/tool/robe_001.json +0 -8
  32. package/test_db/dao_test_1785991977965/tool/shield_001.json +0 -8
  33. package/test_db/dao_test_1785991977965/tool/staff_001.json +0 -8
  34. package/test_db/dao_test_1785991977965/tool/sword_001.json +0 -8
  35. package/test_db/dao_test_1785993793800/account/1.json +0 -58
  36. package/test_db/dao_test_1785993793800/account/2.json +0 -25
  37. package/test_db/dao_test_1785993793800/account/_meta.json +0 -18
  38. package/test_db/dao_test_1785993793800/role/1.json +0 -7
  39. package/test_db/dao_test_1785993793800/role/2.json +0 -7
  40. package/test_db/dao_test_1785993793800/role/3.json +0 -7
  41. package/test_db/dao_test_1785993793800/role/_meta.json +0 -18
  42. package/test_db/dao_test_1785993793800/tool/_meta.json +0 -18
  43. package/test_db/dao_test_1785993793800/tool/bow_001.json +0 -8
  44. package/test_db/dao_test_1785993793800/tool/robe_001.json +0 -8
  45. package/test_db/dao_test_1785993793800/tool/shield_001.json +0 -8
  46. package/test_db/dao_test_1785993793800/tool/staff_001.json +0 -8
  47. package/test_db/dao_test_1785993793800/tool/sword_001.json +0 -8
  48. package/test_db/dao_test_1785993841615/account/1.json +0 -58
  49. package/test_db/dao_test_1785993841615/account/2.json +0 -25
  50. package/test_db/dao_test_1785993841615/account/_meta.json +0 -18
  51. package/test_db/dao_test_1785993841615/role/1.json +0 -7
  52. package/test_db/dao_test_1785993841615/role/2.json +0 -7
  53. package/test_db/dao_test_1785993841615/role/3.json +0 -7
  54. package/test_db/dao_test_1785993841615/role/_meta.json +0 -18
  55. package/test_db/dao_test_1785993841615/tool/_meta.json +0 -18
  56. package/test_db/dao_test_1785993841615/tool/bow_001.json +0 -8
  57. package/test_db/dao_test_1785993841615/tool/robe_001.json +0 -8
  58. package/test_db/dao_test_1785993841615/tool/shield_001.json +0 -8
  59. package/test_db/dao_test_1785993841615/tool/staff_001.json +0 -8
  60. package/test_db/dao_test_1785993841615/tool/sword_001.json +0 -8
  61. package/test_db/dao_test_1785998204124/account/1.json +0 -58
  62. package/test_db/dao_test_1785998204124/account/2.json +0 -25
  63. package/test_db/dao_test_1785998204124/account/_meta.json +0 -18
  64. package/test_db/dao_test_1785998204124/role/1.json +0 -7
  65. package/test_db/dao_test_1785998204124/role/2.json +0 -7
  66. package/test_db/dao_test_1785998204124/role/3.json +0 -7
  67. package/test_db/dao_test_1785998204124/role/_meta.json +0 -18
  68. package/test_db/dao_test_1785998204124/tool/_meta.json +0 -18
  69. package/test_db/dao_test_1785998204124/tool/bow_001.json +0 -8
  70. package/test_db/dao_test_1785998204124/tool/robe_001.json +0 -8
  71. package/test_db/dao_test_1785998204124/tool/shield_001.json +0 -8
  72. package/test_db/dao_test_1785998204124/tool/staff_001.json +0 -8
  73. package/test_db/dao_test_1785998204124/tool/sword_001.json +0 -8
  74. package/test_db/dao_test_1785998207460/account/1.json +0 -58
  75. package/test_db/dao_test_1785998207460/account/2.json +0 -25
  76. package/test_db/dao_test_1785998207460/account/_meta.json +0 -18
  77. package/test_db/dao_test_1785998207460/role/1.json +0 -7
  78. package/test_db/dao_test_1785998207460/role/2.json +0 -7
  79. package/test_db/dao_test_1785998207460/role/3.json +0 -7
  80. package/test_db/dao_test_1785998207460/role/_meta.json +0 -18
  81. package/test_db/dao_test_1785998207460/tool/_meta.json +0 -18
  82. package/test_db/dao_test_1785998207460/tool/bow_001.json +0 -8
  83. package/test_db/dao_test_1785998207460/tool/robe_001.json +0 -8
  84. package/test_db/dao_test_1785998207460/tool/shield_001.json +0 -8
  85. package/test_db/dao_test_1785998207460/tool/staff_001.json +0 -8
  86. package/test_db/dao_test_1785998207460/tool/sword_001.json +0 -8
  87. package/test_db/dao_test_1785998210638/account/1.json +0 -58
  88. package/test_db/dao_test_1785998210638/account/2.json +0 -25
  89. package/test_db/dao_test_1785998210638/account/_meta.json +0 -18
  90. package/test_db/dao_test_1785998210638/role/1.json +0 -7
  91. package/test_db/dao_test_1785998210638/role/2.json +0 -7
  92. package/test_db/dao_test_1785998210638/role/3.json +0 -7
  93. package/test_db/dao_test_1785998210638/role/_meta.json +0 -18
  94. package/test_db/dao_test_1785998210638/tool/_meta.json +0 -18
  95. package/test_db/dao_test_1785998210638/tool/bow_001.json +0 -8
  96. package/test_db/dao_test_1785998210638/tool/robe_001.json +0 -8
  97. package/test_db/dao_test_1785998210638/tool/shield_001.json +0 -8
  98. package/test_db/dao_test_1785998210638/tool/staff_001.json +0 -8
  99. package/test_db/dao_test_1785998210638/tool/sword_001.json +0 -8
  100. package/test_db/dao_test_1785998213852/account/1.json +0 -58
  101. package/test_db/dao_test_1785998213852/account/2.json +0 -25
  102. package/test_db/dao_test_1785998213852/account/_meta.json +0 -18
  103. package/test_db/dao_test_1785998213852/role/1.json +0 -7
  104. package/test_db/dao_test_1785998213852/role/2.json +0 -7
  105. package/test_db/dao_test_1785998213852/role/3.json +0 -7
  106. package/test_db/dao_test_1785998213852/role/_meta.json +0 -18
  107. package/test_db/dao_test_1785998213852/tool/_meta.json +0 -18
  108. package/test_db/dao_test_1785998213852/tool/bow_001.json +0 -8
  109. package/test_db/dao_test_1785998213852/tool/robe_001.json +0 -8
  110. package/test_db/dao_test_1785998213852/tool/shield_001.json +0 -8
  111. package/test_db/dao_test_1785998213852/tool/staff_001.json +0 -8
  112. package/test_db/dao_test_1785998213852/tool/sword_001.json +0 -8
  113. package/test_db/dao_test_1785998217094/account/1.json +0 -58
  114. package/test_db/dao_test_1785998217094/account/2.json +0 -25
  115. package/test_db/dao_test_1785998217094/account/_meta.json +0 -18
  116. package/test_db/dao_test_1785998217094/role/1.json +0 -7
  117. package/test_db/dao_test_1785998217094/role/2.json +0 -7
  118. package/test_db/dao_test_1785998217094/role/3.json +0 -7
  119. package/test_db/dao_test_1785998217094/role/_meta.json +0 -18
  120. package/test_db/dao_test_1785998217094/tool/_meta.json +0 -18
  121. package/test_db/dao_test_1785998217094/tool/bow_001.json +0 -8
  122. package/test_db/dao_test_1785998217094/tool/robe_001.json +0 -8
  123. package/test_db/dao_test_1785998217094/tool/shield_001.json +0 -8
  124. package/test_db/dao_test_1785998217094/tool/staff_001.json +0 -8
  125. package/test_db/dao_test_1785998217094/tool/sword_001.json +0 -8
  126. package/test_db/dao_test_1786000291805/account/1.json +0 -58
  127. package/test_db/dao_test_1786000291805/account/2.json +0 -25
  128. package/test_db/dao_test_1786000291805/account/_meta.json +0 -18
  129. package/test_db/dao_test_1786000291805/role/1.json +0 -7
  130. package/test_db/dao_test_1786000291805/role/2.json +0 -7
  131. package/test_db/dao_test_1786000291805/role/3.json +0 -7
  132. package/test_db/dao_test_1786000291805/role/_meta.json +0 -18
  133. package/test_db/dao_test_1786000291805/tool/_meta.json +0 -18
  134. package/test_db/dao_test_1786000291805/tool/bow_001.json +0 -8
  135. package/test_db/dao_test_1786000291805/tool/robe_001.json +0 -8
  136. package/test_db/dao_test_1786000291805/tool/shield_001.json +0 -8
  137. package/test_db/dao_test_1786000291805/tool/staff_001.json +0 -8
  138. package/test_db/dao_test_1786000291805/tool/sword_001.json +0 -8
  139. package/test_db/dao_test_1786001183999/account/1.json +0 -58
  140. package/test_db/dao_test_1786001183999/account/2.json +0 -25
  141. package/test_db/dao_test_1786001183999/account/_meta.json +0 -18
  142. package/test_db/dao_test_1786001183999/role/1.json +0 -7
  143. package/test_db/dao_test_1786001183999/role/2.json +0 -7
  144. package/test_db/dao_test_1786001183999/role/3.json +0 -7
  145. package/test_db/dao_test_1786001183999/role/_meta.json +0 -18
  146. package/test_db/dao_test_1786001183999/tool/_meta.json +0 -18
  147. package/test_db/dao_test_1786001183999/tool/bow_001.json +0 -8
  148. package/test_db/dao_test_1786001183999/tool/robe_001.json +0 -8
  149. package/test_db/dao_test_1786001183999/tool/shield_001.json +0 -8
  150. package/test_db/dao_test_1786001183999/tool/staff_001.json +0 -8
  151. package/test_db/dao_test_1786001183999/tool/sword_001.json +0 -8
  152. package/test_db/dao_test_1786001297521/account/1.json +0 -58
  153. package/test_db/dao_test_1786001297521/account/2.json +0 -25
  154. package/test_db/dao_test_1786001297521/account/_meta.json +0 -18
  155. package/test_db/dao_test_1786001297521/role/1.json +0 -7
  156. package/test_db/dao_test_1786001297521/role/2.json +0 -7
  157. package/test_db/dao_test_1786001297521/role/3.json +0 -7
  158. package/test_db/dao_test_1786001297521/role/_meta.json +0 -18
  159. package/test_db/dao_test_1786001297521/tool/_meta.json +0 -18
  160. package/test_db/dao_test_1786001297521/tool/bow_001.json +0 -8
  161. package/test_db/dao_test_1786001297521/tool/robe_001.json +0 -8
  162. package/test_db/dao_test_1786001297521/tool/shield_001.json +0 -8
  163. package/test_db/dao_test_1786001297521/tool/staff_001.json +0 -8
  164. package/test_db/dao_test_1786001297521/tool/sword_001.json +0 -8
  165. package/test_db/debug_dao_1785992422444/account/1.json +0 -24
  166. package/test_db/debug_dao_1785992422444/account/_meta.json +0 -18
  167. package/test_db/debug_dao_1785992422444/role/1.json +0 -7
  168. package/test_db/debug_dao_1785992422444/role/2.json +0 -7
  169. package/test_db/debug_dao_1785992422444/role/_meta.json +0 -18
  170. package/test_db/debug_dao_1785992422444/tool/_meta.json +0 -18
  171. package/test_db/debug_dao_1785992422444/tool/shield_001.json +0 -7
  172. package/test_db/debug_dao_1785992422444/tool/staff_001.json +0 -7
  173. package/test_db/debug_dao_1785992422444/tool/sword_001.json +0 -7
  174. package/test_db/debug_dao_1785993785567/account/1.json +0 -47
  175. package/test_db/debug_dao_1785993785567/account/_meta.json +0 -18
  176. package/test_db/debug_dao_1785993785567/role/1.json +0 -7
  177. package/test_db/debug_dao_1785993785567/role/2.json +0 -7
  178. package/test_db/debug_dao_1785993785567/role/_meta.json +0 -18
  179. package/test_db/debug_dao_1785993785567/tool/_meta.json +0 -18
  180. package/test_db/debug_dao_1785993785567/tool/shield_001.json +0 -7
  181. package/test_db/debug_dao_1785993785567/tool/staff_001.json +0 -7
  182. package/test_db/debug_dao_1785993785567/tool/sword_001.json +0 -7
  183. package/test_db/debug_dao_check/tool/_meta.json +0 -18
  184. package/test_db/debug_dao_check/tool/sword_001.json +0 -6
  185. package/test_db/test_1785973671479/users/1.json +0 -5
  186. package/test_db/test_1785973671479/users/_meta.json +0 -20
  187. package/tests/dao_test.js +0 -213
  188. package/tests/debug_error_test.js +0 -165
  189. package/tests/debug_test.js +0 -35
  190. package/tests/debug_test2.js +0 -45
  191. package/tests/debug_test3.js +0 -54
  192. package/tests/detailed_error_test.js +0 -171
  193. package/tests/main.test.js +0 -261
  194. package/tests/query.test.js +0 -142
  195. package/tests/scope.test.js +0 -72
  196. package/tests/test.js +0 -325
  197. package/tests/test2.js +0 -64
@@ -1,58 +0,0 @@
1
- {
2
- "username": "player1",
3
- "password": "123",
4
- "email": "new_email@test.com",
5
- "id": 1,
6
- "role": {
7
- "战士": {
8
- "name": "战士",
9
- "account_id": "player1",
10
- "level": 15,
11
- "exp": 500,
12
- "id": 1,
13
- "tool": {
14
- "shield_001": {
15
- "id": "shield_001",
16
- "role_id": "战士",
17
- "name": "铁盾",
18
- "atk": 0,
19
- "def": 30,
20
- "type": "armor"
21
- },
22
- "sword_001": {
23
- "id": "sword_001",
24
- "role_id": "战士",
25
- "name": "勇者之剑",
26
- "atk": 100,
27
- "def": 0,
28
- "type": "weapon"
29
- }
30
- }
31
- },
32
- "法师": {
33
- "name": "法师",
34
- "account_id": "player1",
35
- "level": 8,
36
- "exp": 300,
37
- "id": 2,
38
- "tool": {
39
- "robe_001": {
40
- "id": "robe_001",
41
- "role_id": "法师",
42
- "name": "法师长袍",
43
- "atk": 0,
44
- "def": 20,
45
- "type": "armor"
46
- },
47
- "staff_001": {
48
- "id": "staff_001",
49
- "role_id": "法师",
50
- "name": "魔法杖",
51
- "atk": 80,
52
- "def": 0,
53
- "type": "weapon"
54
- }
55
- }
56
- }
57
- }
58
- }
@@ -1,25 +0,0 @@
1
- {
2
- "username": "player2",
3
- "password": "456",
4
- "email": "p2@test.com",
5
- "id": 2,
6
- "role": {
7
- "弓箭手": {
8
- "name": "弓箭手",
9
- "account_id": "player2",
10
- "level": 5,
11
- "exp": 100,
12
- "id": 3,
13
- "tool": {
14
- "bow_001": {
15
- "id": "bow_001",
16
- "role_id": "弓箭手",
17
- "name": "精灵之弓",
18
- "atk": 35,
19
- "def": 0,
20
- "type": "weapon"
21
- }
22
- }
23
- }
24
- }
25
- }
@@ -1,18 +0,0 @@
1
- {
2
- "table": "account",
3
- "key": "username",
4
- "auto_increment": 2,
5
- "created_at": "2026-08-06T06:36:44.367Z",
6
- "fields": [
7
- {
8
- "name": "username",
9
- "type": "varchar",
10
- "not_null": true,
11
- "auto": false,
12
- "pk": true,
13
- "default_value": null,
14
- "note": "账户表"
15
- }
16
- ],
17
- "indexes": []
18
- }
@@ -1,7 +0,0 @@
1
- {
2
- "name": "战士",
3
- "account_id": "player1",
4
- "level": 15,
5
- "exp": 500,
6
- "id": 1
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "name": "法师",
3
- "account_id": "player1",
4
- "level": 8,
5
- "exp": 300,
6
- "id": 2
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "name": "弓箭手",
3
- "account_id": "player2",
4
- "level": 5,
5
- "exp": 100,
6
- "id": 3
7
- }
@@ -1,18 +0,0 @@
1
- {
2
- "table": "role",
3
- "key": "name",
4
- "auto_increment": 3,
5
- "created_at": "2026-08-06T06:36:44.391Z",
6
- "fields": [
7
- {
8
- "name": "name",
9
- "type": "varchar",
10
- "not_null": true,
11
- "auto": false,
12
- "pk": true,
13
- "default_value": null,
14
- "note": "角色表"
15
- }
16
- ],
17
- "indexes": []
18
- }
@@ -1,18 +0,0 @@
1
- {
2
- "table": "tool",
3
- "key": "id",
4
- "auto_increment": 0,
5
- "created_at": "2026-08-06T06:36:44.403Z",
6
- "fields": [
7
- {
8
- "name": "id",
9
- "type": "varchar",
10
- "not_null": true,
11
- "auto": false,
12
- "pk": true,
13
- "default_value": null,
14
- "note": "道具表"
15
- }
16
- ],
17
- "indexes": []
18
- }
@@ -1,8 +0,0 @@
1
- {
2
- "id": "bow_001",
3
- "role_id": "弓箭手",
4
- "name": "精灵之弓",
5
- "atk": 35,
6
- "def": 0,
7
- "type": "weapon"
8
- }
@@ -1,8 +0,0 @@
1
- {
2
- "id": "robe_001",
3
- "role_id": "法师",
4
- "name": "法师长袍",
5
- "atk": 0,
6
- "def": 20,
7
- "type": "armor"
8
- }
@@ -1,8 +0,0 @@
1
- {
2
- "id": "shield_001",
3
- "role_id": "战士",
4
- "name": "铁盾",
5
- "atk": 0,
6
- "def": 30,
7
- "type": "armor"
8
- }
@@ -1,8 +0,0 @@
1
- {
2
- "id": "staff_001",
3
- "role_id": "法师",
4
- "name": "魔法杖",
5
- "atk": 80,
6
- "def": 0,
7
- "type": "weapon"
8
- }
@@ -1,8 +0,0 @@
1
- {
2
- "id": "sword_001",
3
- "role_id": "战士",
4
- "name": "勇者之剑",
5
- "atk": 100,
6
- "def": 0,
7
- "type": "weapon"
8
- }
@@ -1,58 +0,0 @@
1
- {
2
- "username": "player1",
3
- "password": "123",
4
- "email": "new_email@test.com",
5
- "id": 1,
6
- "role": {
7
- "战士": {
8
- "name": "战士",
9
- "account_id": "player1",
10
- "level": 15,
11
- "exp": 500,
12
- "id": 1,
13
- "tool": {
14
- "shield_001": {
15
- "id": "shield_001",
16
- "role_id": "战士",
17
- "name": "铁盾",
18
- "atk": 0,
19
- "def": 30,
20
- "type": "armor"
21
- },
22
- "sword_001": {
23
- "id": "sword_001",
24
- "role_id": "战士",
25
- "name": "勇者之剑",
26
- "atk": 100,
27
- "def": 0,
28
- "type": "weapon"
29
- }
30
- }
31
- },
32
- "法师": {
33
- "name": "法师",
34
- "account_id": "player1",
35
- "level": 8,
36
- "exp": 300,
37
- "id": 2,
38
- "tool": {
39
- "robe_001": {
40
- "id": "robe_001",
41
- "role_id": "法师",
42
- "name": "法师长袍",
43
- "atk": 0,
44
- "def": 20,
45
- "type": "armor"
46
- },
47
- "staff_001": {
48
- "id": "staff_001",
49
- "role_id": "法师",
50
- "name": "魔法杖",
51
- "atk": 80,
52
- "def": 0,
53
- "type": "weapon"
54
- }
55
- }
56
- }
57
- }
58
- }
@@ -1,25 +0,0 @@
1
- {
2
- "username": "player2",
3
- "password": "456",
4
- "email": "p2@test.com",
5
- "id": 2,
6
- "role": {
7
- "弓箭手": {
8
- "name": "弓箭手",
9
- "account_id": "player2",
10
- "level": 5,
11
- "exp": 100,
12
- "id": 3,
13
- "tool": {
14
- "bow_001": {
15
- "id": "bow_001",
16
- "role_id": "弓箭手",
17
- "name": "精灵之弓",
18
- "atk": 35,
19
- "def": 0,
20
- "type": "weapon"
21
- }
22
- }
23
- }
24
- }
25
- }
@@ -1,18 +0,0 @@
1
- {
2
- "table": "account",
3
- "key": "username",
4
- "auto_increment": 2,
5
- "created_at": "2026-08-06T06:36:47.653Z",
6
- "fields": [
7
- {
8
- "name": "username",
9
- "type": "varchar",
10
- "not_null": true,
11
- "auto": false,
12
- "pk": true,
13
- "default_value": null,
14
- "note": "账户表"
15
- }
16
- ],
17
- "indexes": []
18
- }
@@ -1,7 +0,0 @@
1
- {
2
- "name": "战士",
3
- "account_id": "player1",
4
- "level": 15,
5
- "exp": 500,
6
- "id": 1
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "name": "法师",
3
- "account_id": "player1",
4
- "level": 8,
5
- "exp": 300,
6
- "id": 2
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "name": "弓箭手",
3
- "account_id": "player2",
4
- "level": 5,
5
- "exp": 100,
6
- "id": 3
7
- }
@@ -1,18 +0,0 @@
1
- {
2
- "table": "role",
3
- "key": "name",
4
- "auto_increment": 3,
5
- "created_at": "2026-08-06T06:36:47.676Z",
6
- "fields": [
7
- {
8
- "name": "name",
9
- "type": "varchar",
10
- "not_null": true,
11
- "auto": false,
12
- "pk": true,
13
- "default_value": null,
14
- "note": "角色表"
15
- }
16
- ],
17
- "indexes": []
18
- }
@@ -1,18 +0,0 @@
1
- {
2
- "table": "tool",
3
- "key": "id",
4
- "auto_increment": 0,
5
- "created_at": "2026-08-06T06:36:47.687Z",
6
- "fields": [
7
- {
8
- "name": "id",
9
- "type": "varchar",
10
- "not_null": true,
11
- "auto": false,
12
- "pk": true,
13
- "default_value": null,
14
- "note": "道具表"
15
- }
16
- ],
17
- "indexes": []
18
- }
@@ -1,8 +0,0 @@
1
- {
2
- "id": "bow_001",
3
- "role_id": "弓箭手",
4
- "name": "精灵之弓",
5
- "atk": 35,
6
- "def": 0,
7
- "type": "weapon"
8
- }
@@ -1,8 +0,0 @@
1
- {
2
- "id": "robe_001",
3
- "role_id": "法师",
4
- "name": "法师长袍",
5
- "atk": 0,
6
- "def": 20,
7
- "type": "armor"
8
- }
@@ -1,8 +0,0 @@
1
- {
2
- "id": "shield_001",
3
- "role_id": "战士",
4
- "name": "铁盾",
5
- "atk": 0,
6
- "def": 30,
7
- "type": "armor"
8
- }
@@ -1,8 +0,0 @@
1
- {
2
- "id": "staff_001",
3
- "role_id": "法师",
4
- "name": "魔法杖",
5
- "atk": 80,
6
- "def": 0,
7
- "type": "weapon"
8
- }
@@ -1,8 +0,0 @@
1
- {
2
- "id": "sword_001",
3
- "role_id": "战士",
4
- "name": "勇者之剑",
5
- "atk": 100,
6
- "def": 0,
7
- "type": "weapon"
8
- }
@@ -1,58 +0,0 @@
1
- {
2
- "username": "player1",
3
- "password": "123",
4
- "email": "new_email@test.com",
5
- "id": 1,
6
- "role": {
7
- "战士": {
8
- "name": "战士",
9
- "account_id": "player1",
10
- "level": 15,
11
- "exp": 500,
12
- "id": 1,
13
- "tool": {
14
- "shield_001": {
15
- "id": "shield_001",
16
- "role_id": "战士",
17
- "name": "铁盾",
18
- "atk": 0,
19
- "def": 30,
20
- "type": "armor"
21
- },
22
- "sword_001": {
23
- "id": "sword_001",
24
- "role_id": "战士",
25
- "name": "勇者之剑",
26
- "atk": 100,
27
- "def": 0,
28
- "type": "weapon"
29
- }
30
- }
31
- },
32
- "法师": {
33
- "name": "法师",
34
- "account_id": "player1",
35
- "level": 8,
36
- "exp": 300,
37
- "id": 2,
38
- "tool": {
39
- "robe_001": {
40
- "id": "robe_001",
41
- "role_id": "法师",
42
- "name": "法师长袍",
43
- "atk": 0,
44
- "def": 20,
45
- "type": "armor"
46
- },
47
- "staff_001": {
48
- "id": "staff_001",
49
- "role_id": "法师",
50
- "name": "魔法杖",
51
- "atk": 80,
52
- "def": 0,
53
- "type": "weapon"
54
- }
55
- }
56
- }
57
- }
58
- }
@@ -1,25 +0,0 @@
1
- {
2
- "username": "player2",
3
- "password": "456",
4
- "email": "p2@test.com",
5
- "id": 2,
6
- "role": {
7
- "弓箭手": {
8
- "name": "弓箭手",
9
- "account_id": "player2",
10
- "level": 5,
11
- "exp": 100,
12
- "id": 3,
13
- "tool": {
14
- "bow_001": {
15
- "id": "bow_001",
16
- "role_id": "弓箭手",
17
- "name": "精灵之弓",
18
- "atk": 35,
19
- "def": 0,
20
- "type": "weapon"
21
- }
22
- }
23
- }
24
- }
25
- }
@@ -1,18 +0,0 @@
1
- {
2
- "table": "account",
3
- "key": "username",
4
- "auto_increment": 2,
5
- "created_at": "2026-08-06T06:36:50.850Z",
6
- "fields": [
7
- {
8
- "name": "username",
9
- "type": "varchar",
10
- "not_null": true,
11
- "auto": false,
12
- "pk": true,
13
- "default_value": null,
14
- "note": "账户表"
15
- }
16
- ],
17
- "indexes": []
18
- }
@@ -1,7 +0,0 @@
1
- {
2
- "name": "战士",
3
- "account_id": "player1",
4
- "level": 15,
5
- "exp": 500,
6
- "id": 1
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "name": "法师",
3
- "account_id": "player1",
4
- "level": 8,
5
- "exp": 300,
6
- "id": 2
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "name": "弓箭手",
3
- "account_id": "player2",
4
- "level": 5,
5
- "exp": 100,
6
- "id": 3
7
- }
@@ -1,18 +0,0 @@
1
- {
2
- "table": "role",
3
- "key": "name",
4
- "auto_increment": 3,
5
- "created_at": "2026-08-06T06:36:50.862Z",
6
- "fields": [
7
- {
8
- "name": "name",
9
- "type": "varchar",
10
- "not_null": true,
11
- "auto": false,
12
- "pk": true,
13
- "default_value": null,
14
- "note": "角色表"
15
- }
16
- ],
17
- "indexes": []
18
- }
@@ -1,18 +0,0 @@
1
- {
2
- "table": "tool",
3
- "key": "id",
4
- "auto_increment": 0,
5
- "created_at": "2026-08-06T06:36:50.873Z",
6
- "fields": [
7
- {
8
- "name": "id",
9
- "type": "varchar",
10
- "not_null": true,
11
- "auto": false,
12
- "pk": true,
13
- "default_value": null,
14
- "note": "道具表"
15
- }
16
- ],
17
- "indexes": []
18
- }
@@ -1,8 +0,0 @@
1
- {
2
- "id": "bow_001",
3
- "role_id": "弓箭手",
4
- "name": "精灵之弓",
5
- "atk": 35,
6
- "def": 0,
7
- "type": "weapon"
8
- }
@@ -1,8 +0,0 @@
1
- {
2
- "id": "robe_001",
3
- "role_id": "法师",
4
- "name": "法师长袍",
5
- "atk": 0,
6
- "def": 20,
7
- "type": "armor"
8
- }
@@ -1,8 +0,0 @@
1
- {
2
- "id": "shield_001",
3
- "role_id": "战士",
4
- "name": "铁盾",
5
- "atk": 0,
6
- "def": 30,
7
- "type": "armor"
8
- }
@@ -1,8 +0,0 @@
1
- {
2
- "id": "staff_001",
3
- "role_id": "法师",
4
- "name": "魔法杖",
5
- "atk": 80,
6
- "def": 0,
7
- "type": "weapon"
8
- }
@@ -1,8 +0,0 @@
1
- {
2
- "id": "sword_001",
3
- "role_id": "战士",
4
- "name": "勇者之剑",
5
- "atk": 100,
6
- "def": 0,
7
- "type": "weapon"
8
- }