maps-service/pkg/model/submission.go

39 lines
996 B
Go
Raw Normal View History

2024-11-26 13:36:40 -08:00
package model
import "time"
2024-11-27 17:27:22 -08:00
type Status int32
2024-12-12 17:29:20 -05:00
const (
2024-12-14 04:06:49 -08:00
// Phase: Final Status
StatusReleased Status = 9
StatusRejected Status = 8
2024-11-27 17:27:22 -08:00
2024-12-14 04:06:49 -08:00
// Phase: Testing
StatusUploaded Status = 7 // uploaded to the group, but pending release
StatusUploading Status = 6
2024-12-12 17:29:20 -05:00
StatusValidated Status = 5
StatusValidating Status = 4
StatusAccepted Status = 3 // pending script review, can re-trigger validation
2024-11-27 17:27:22 -08:00
2024-12-14 04:06:49 -08:00
// Phase: Creation
2024-12-12 17:29:20 -05:00
StatusChangesRequested Status = 2
StatusSubmitted Status = 1
StatusUnderConstruction Status = 0
2024-11-27 17:27:22 -08:00
)
2024-11-26 18:30:58 -05:00
type Submission struct {
2024-12-12 17:29:20 -05:00
ID int64 `gorm:"primaryKey"`
DisplayName string
Creator string
GameID int32
CreatedAt time.Time
UpdatedAt time.Time
Submitter int64 // UserID
AssetID int64
AssetVersion int64
2024-12-12 17:29:20 -05:00
Completed bool // Has this version of the map been completed at least once on maptest
TargetAssetID int64 // where to upload map fix. if the TargetAssetID is 0, it's a new map.
2024-12-12 17:29:20 -05:00
StatusID Status
2024-11-26 13:36:40 -08:00
}