update
This commit is contained in:
1 parent
0690285147
commit
5618cd2738
154 files changed
+5021
-3161
No files matched your search
@@ -17,52 +17,52 @@ type ApprovalWorkflow struct {
|
||||
}
|
||||
|
||||
func (ApprovalWorkflow) TableName() string {
|
||||
return "sys_approval_workflows"
|
||||
return "approval_workflows"
|
||||
}
|
||||
|
||||
// ApprovalWorkflowStep 审批流程步骤
|
||||
type ApprovalWorkflowStep struct {
|
||||
ID uint `gorm:"primarykey" json:"id"`
|
||||
WorkflowID uint `json:"workflow_id"`
|
||||
StepNumber int `gorm:"not null" json:"step_number"`
|
||||
Name string `gorm:"size:128;not null" json:"name"`
|
||||
StepType string `gorm:"size:32;not null" json:"step_type"` // submit, audit, execute
|
||||
ApproverIDs string `gorm:"type:text" json:"approver_ids"` // JSON array of user IDs
|
||||
IsRequired bool `gorm:"default:true" json:"is_required"`
|
||||
TimeoutHours int `gorm:"default:24" json:"timeout_hours"`
|
||||
AutoApprove bool `gorm:"default:false" json:"auto_approve_on_timeout"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
ID uint `gorm:"primarykey" json:"id"`
|
||||
WorkflowID uint `json:"workflow_id"`
|
||||
StepNumber int `gorm:"not null" json:"step_number"`
|
||||
Name string `gorm:"size:128;not null" json:"name"`
|
||||
StepType string `gorm:"size:32;not null" json:"step_type"` // submit, audit, execute
|
||||
ApproverIDs string `gorm:"type:text" json:"approver_ids"` // JSON array of user IDs
|
||||
IsRequired bool `gorm:"default:true" json:"is_required"`
|
||||
TimeoutHours int `gorm:"default:24" json:"timeout_hours"`
|
||||
AutoApprove bool `gorm:"default:false" json:"auto_approve_on_timeout"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
|
||||
func (ApprovalWorkflowStep) TableName() string {
|
||||
return "sys_approval_workflow_steps"
|
||||
return "approval_workflow_steps"
|
||||
}
|
||||
|
||||
// CreateWorkflowRequest 创建审批流程请求
|
||||
type CreateWorkflowRequest struct {
|
||||
Name string `json:"name" binding:"required"`
|
||||
Description string `json:"description"`
|
||||
Category string `json:"category"`
|
||||
Steps []CreateWorkflowStepReq `json:"steps"`
|
||||
Name string `json:"name" binding:"required"`
|
||||
Description string `json:"description"`
|
||||
Category string `json:"category"`
|
||||
Steps []CreateWorkflowStepReq `json:"steps"`
|
||||
}
|
||||
|
||||
type CreateWorkflowStepReq struct {
|
||||
StepNumber int `json:"step_number"`
|
||||
Name string `json:"name" binding:"required"`
|
||||
StepType string `json:"step_type" binding:"required,oneof=submit audit execute"`
|
||||
ApproverIDs string `json:"approver_ids"`
|
||||
IsRequired bool `json:"is_required"`
|
||||
TimeoutHours int `json:"timeout_hours"`
|
||||
AutoApproveTimeout bool `json:"auto_approve_on_timeout"`
|
||||
StepNumber int `json:"step_number"`
|
||||
Name string `json:"name" binding:"required"`
|
||||
StepType string `json:"step_type" binding:"required,oneof=submit audit execute"`
|
||||
ApproverIDs string `json:"approver_ids"`
|
||||
IsRequired bool `json:"is_required"`
|
||||
TimeoutHours int `json:"timeout_hours"`
|
||||
AutoApproveTimeout bool `json:"auto_approve_on_timeout"`
|
||||
}
|
||||
|
||||
// UpdateWorkflowRequest 更新审批流程请求
|
||||
type UpdateWorkflowRequest struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
Description *string `json:"description,omitempty"`
|
||||
Category *string `json:"category,omitempty"`
|
||||
IsActive *bool `json:"is_active,omitempty"`
|
||||
IsDefault *bool `json:"is_default,omitempty"`
|
||||
Steps []CreateWorkflowStepReq `json:"steps,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
Description *string `json:"description,omitempty"`
|
||||
Category *string `json:"category,omitempty"`
|
||||
IsActive *bool `json:"is_active,omitempty"`
|
||||
IsDefault *bool `json:"is_default,omitempty"`
|
||||
Steps []CreateWorkflowStepReq `json:"steps,omitempty"`
|
||||
}
|
||||
Reference in new issue
Block a user