mirror of
https://github.com/flipped-aurora/gin-vue-admin.git
synced 2026-09-21 12:32:25 +00:00
修改 workflow数据结构
This commit is contained in:
@@ -29,8 +29,6 @@ func MysqlTables(db *gorm.DB) {
|
||||
model.SysBaseMenu{},
|
||||
model.SysBaseMenuParameter{},
|
||||
model.JwtBlacklist{},
|
||||
model.SysWorkflow{},
|
||||
model.SysWorkflowStepInfo{},
|
||||
model.SysDictionary{},
|
||||
model.SysDictionaryDetail{},
|
||||
model.ExaFileUploadAndDownload{},
|
||||
@@ -39,6 +37,10 @@ func MysqlTables(db *gorm.DB) {
|
||||
model.ExaSimpleUploader{},
|
||||
model.ExaCustomer{},
|
||||
model.SysOperationRecord{},
|
||||
model.WorkflowProcess{},
|
||||
model.WorkflowNode{},
|
||||
model.WorkflowEdge{},
|
||||
model.WorkflowPoint{},
|
||||
)
|
||||
if err != nil {
|
||||
global.GVA_LOG.Error("register table failed", zap.Any("err", err))
|
||||
@@ -84,4 +86,4 @@ func gormConfig(mod bool) *gorm.Config {
|
||||
DisableForeignKeyConstraintWhenMigrating: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,6 @@ func Routers() *gin.Engine {
|
||||
router.InitApiRouter(ApiGroup) // 注册功能api路由
|
||||
router.InitFileUploadAndDownloadRouter(ApiGroup) // 文件上传下载功能路由
|
||||
router.InitSimpleUploaderRouter(ApiGroup) // 断点续传(插件版)
|
||||
router.InitWorkflowRouter(ApiGroup) // 工作流相关路由
|
||||
router.InitCasbinRouter(ApiGroup) // 权限相关路由
|
||||
router.InitJwtRouter(ApiGroup) // jwt相关路由
|
||||
router.InitSystemRouter(ApiGroup) // system相关路由
|
||||
|
||||
@@ -15,7 +15,6 @@ type WorkflowNode struct {
|
||||
ID string `json:"id" gorm:"comment:节点id;primaryKey"`
|
||||
WorkflowProcessID string `json:"-" gorm:"comment:流程标识"`
|
||||
Clazz string `json:"clazz" gorm:"comment:节点类型"`
|
||||
Size [2]int `json:"size" gorm:"comment:节点大小"`
|
||||
Label string `json:"label" gorm:"comment:节点名称"`
|
||||
Type string `json:"type" gorm:"comment:图标类型"`
|
||||
Shape string `json:"shape" gorm:"comment:形状"`
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"gin-vue-admin/api/v1"
|
||||
"gin-vue-admin/middleware"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func InitWorkflowRouter(Router *gin.RouterGroup) {
|
||||
WorkflowRouter := Router.Group("workflow").Use(middleware.JWTAuth()).Use(middleware.CasbinHandler())
|
||||
{
|
||||
WorkflowRouter.POST("createWorkFlow", v1.CreateWorkFlow) // 创建工作流
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"gin-vue-admin/global"
|
||||
"gin-vue-admin/model"
|
||||
)
|
||||
|
||||
// @title Create
|
||||
// @description create a workflow, 创建工作流
|
||||
// @auth (2020/04/05 20:22)
|
||||
// @param wk model.SysWorkflow
|
||||
// @return error
|
||||
|
||||
func Create(wk model.SysWorkflow) error {
|
||||
err := global.GVA_DB.Create(&wk).Error
|
||||
return err
|
||||
}
|
||||
Reference in New Issue
Block a user