mirror of
https://github.com/Dvorinka/MyClubServer.git
synced 2026-06-04 02:32:57 +00:00
upload
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package models
|
||||
|
||||
import "gorm.io/gorm"
|
||||
|
||||
// CompetitionAlias allows renaming competitions site-wide by FACR code
|
||||
// Example: code "A1A" -> alias "Krajský přebor"
|
||||
// The API continues to return original codes; frontend/admin can map to aliases.
|
||||
type CompetitionAlias struct {
|
||||
gorm.Model
|
||||
Code string `gorm:"uniqueIndex;not null" json:"code"` // FACR competition code, e.g. A1A
|
||||
Alias string `gorm:"not null" json:"alias"` // Display name used in UI
|
||||
OriginalName string `json:"original_name"` // Optional: last seen original name
|
||||
DisplayOrder int `json:"display_order"` // Custom sort order (lower = higher priority)
|
||||
}
|
||||
|
||||
func (CompetitionAlias) TableName() string { return "competition_aliases" }
|
||||
Reference in New Issue
Block a user