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.
- package/lib/index.js +16 -8
- 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(
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
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();
|