nquest/pkg/models/game.go

20 lines
355 B
Go

package models
type Game struct {
Model
Visible bool `gorm:"index"`
Title string
Description string
Tasks []*Task `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
Authors []*User `gorm:"many2many:game_authors"`
Type GameType
Points int
}
type GameType int
const (
VirtualGame GameType = iota
CityGame
)