mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 05:21:57 +00:00
29 lines
932 B
Go
29 lines
932 B
Go
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"`
|
|
}
|