submissions: ruin script data model

This commit is contained in:
Quaternions 2025-03-31 18:06:39 -07:00
parent 3404251c14
commit 9671c357f4
Signed by: Quaternions
GPG Key ID: D0DF5964F79AC131

@ -23,12 +23,20 @@ func HashParse(hash string) (uint64, error){
return strconv.ParseUint(hash, 16, 64)
}
type ResourceType int32
const (
ResourceUnknown ResourceType = 0
ResourceMapfix ResourceType = 1
ResourceSubmission ResourceType = 2
)
type Script struct {
ID int64 `gorm:"primaryKey"`
Name string
Hash int64 // postgres does not support unsigned integers, so we have to pretend
Source string
SubmissionID int64 // which submission did this script first appear in
ResourceType ResourceType // is this a submission or is it a mapfix
ResourceID int64 // which submission / mapfix did this script first appear in
CreatedAt time.Time
UpdatedAt time.Time
}