/
workflow_queue.go
41 lines (33 loc) · 2.02 KB
/
workflow_queue.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
Copyright 2022 The KodeRover Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package models
import (
"go.mongodb.org/mongo-driver/bson/primitive"
"github.com/koderover/zadig/pkg/microservice/aslan/config"
)
type WorkflowQueue struct {
ID primitive.ObjectID `bson:"_id,omitempty" json:"id,omitempty"`
TaskID int64 `bson:"task_id" json:"task_id"`
ProjectName string `bson:"project_name" json:"project_name"`
WorkflowName string `bson:"workflow_name" json:"workflow_name"`
WorkflowDisplayName string `bson:"workflow_display_name" json:"workflow_display_name"`
Status config.Status `bson:"status" json:"status,omitempty"`
Stages []*StageTask `bson:"stages" json:"stages"`
TaskCreator string `bson:"task_creator" json:"task_creator,omitempty"`
TaskRevoker string `bson:"task_revoker,omitempty" json:"task_revoker,omitempty"`
CreateTime int64 `bson:"create_time" json:"create_time,omitempty"`
MultiRun bool `bson:"multi_run" json:"multi_run"`
}
func (WorkflowQueue) TableName() string {
return "workflow_queue"
}