mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
feat(BE): approval_workflow, adjusment project_flocks, common, and migration
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
package entities
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type ApprovalAction string
|
||||
|
||||
const (
|
||||
ApprovalActionApproved ApprovalAction = "APPROVED"
|
||||
ApprovalActionRejected ApprovalAction = "REJECTED"
|
||||
ApprovalActionCreated ApprovalAction = "CREATED"
|
||||
ApprovalActionUpdated ApprovalAction = "UPDATED"
|
||||
)
|
||||
|
||||
type Approval struct {
|
||||
Id uint `gorm:"primaryKey"`
|
||||
ApprovableType string `gorm:"size:50;not null;index:approvals_approvable_lookup,priority:1"`
|
||||
ApprovableId uint `gorm:"not null;index:approvals_approvable_lookup,priority:2"`
|
||||
StepNumber uint16 `gorm:"not null"`
|
||||
StepName string `gorm:"not null"`
|
||||
Action *ApprovalAction `gorm:"type:VARCHAR(20)"`
|
||||
Notes *string `gorm:"type:text"`
|
||||
ActionAt time.Time `gorm:"autoCreateTime"`
|
||||
ActionBy *uint `gorm:"index"`
|
||||
|
||||
ActionUser *User `gorm:"foreignKey:ActionBy;references:Id"`
|
||||
}
|
||||
Reference in New Issue
Block a user