koishi-plugin-toram 4.2.0-test.4 → 4.2.0-test.6

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 (2) hide show
  1. package/lib/index.js +16 -8
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -859,20 +859,28 @@ var Config = import_koishi.Schema.intersect([
859
859
  ]);
860
860
  async function apply(ctx, config) {
861
861
  const logger = ctx.logger("toram");
862
- ctx.model.extend("toram_user", {
863
- // 各字段的类型声明
864
- qq: "string",
865
- nickname: "string",
866
- otherNames: "list",
867
- monthlyCardRemindTimeIndex: "integer",
868
- lastGetMonthlyCardDate: "string"
869
- });
862
+ ctx.model.extend(
863
+ "toram_user",
864
+ {
865
+ // 各字段的类型声明
866
+ qq: "string",
867
+ nickname: "string",
868
+ otherNames: "list",
869
+ monthlyCardRemindTimeIndex: "integer",
870
+ lastGetMonthlyCardDate: "string"
871
+ },
872
+ {
873
+ primary: "qq"
874
+ }
875
+ );
870
876
  ctx.model.extend("toram_todo", {
871
877
  // 各字段的类型声明
872
878
  id: "string",
873
879
  ts: "double",
874
880
  type: "string",
875
881
  payload: "json"
882
+ }, {
883
+ primary: "id"
876
884
  });
877
885
  JsonMgr.Inst().setLogger(logger);
878
886
  await JsonMgr.Inst().loadJson();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-toram",
3
3
  "description": "托拉姆物语小工具",
4
- "version": "4.2.0-test.4",
4
+ "version": "4.2.0-test.6",
5
5
  "contributors": [
6
6
  "青灯 <1874053520@qq.com>"
7
7
  ],