Add models for game, cache and settings.
This commit is contained in:
16
models/game.go
Normal file
16
models/game.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package models
|
||||
|
||||
type Game struct {
|
||||
ID uint `json:"id" gorm:"primary_key"`
|
||||
Name string `json:"name" binding:"required"`
|
||||
Tag string `json:"tag" binding:"required"`
|
||||
Settings []GameSetting `json:"settings" gorm:"foreignKey:GameID"`
|
||||
}
|
||||
|
||||
type GameSetting struct {
|
||||
ID uint `json:"id" gorm:"primary_key"`
|
||||
GameID uint `json:"game_id"`
|
||||
Name string `json:"name" binding:"required"`
|
||||
WeaponCategory string `json:"weapon_category"`
|
||||
Value float64 `json:"value" binding:"required"`
|
||||
}
|
||||
Reference in New Issue
Block a user