20 lines
464 B
Go
20 lines
464 B
Go
package model
|
|
|
|
import "time"
|
|
|
|
type OperationStatus int32
|
|
const (
|
|
OperationStatusCreated OperationStatus = 0
|
|
OperationStatusCompleted OperationStatus = 1
|
|
OperationStatusFailed OperationStatus = 2
|
|
)
|
|
|
|
type Operation struct {
|
|
ID int32 `gorm:"primaryKey"`
|
|
CreatedAt time.Time
|
|
Owner uint64 // UserID
|
|
StatusID OperationStatus
|
|
StatusMessage string
|
|
Path string // redirect to view completed operation e.g. "/mapfixes/4"
|
|
}
|