新增分组的hook模板配置

This commit is contained in:
2024-07-13 18:37:45 +08:00
parent e5a2af25e8
commit 34d765d1e2
11 changed files with 128 additions and 44 deletions

View File

@@ -9,7 +9,8 @@ class genCodeModel extends baseModel {
getSchema() {
return {
uid: { type: Number},
project_id: { type: Number, required: true },
project_id: { type: Number, required: false },
group_id: { type: Number, required: false },
//是否开启自动同步
tag: { type: String, default: "default" },
tag_desc: { type: String, default: "默认" },
@@ -33,6 +34,13 @@ class genCodeModel extends baseModel {
})
}
listByGroupId(id) {
return this.model.find({
group_id: id
})
}
delByProjectId(project_id){
return this.model.remove({
project_id: project_id