24 lines
430 B
Go
24 lines
430 B
Go
package models
|
|
|
|
import "github.com/google/uuid"
|
|
|
|
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
|
|
Icon *File
|
|
IconID uuid.UUID
|
|
}
|
|
|
|
type GameType int
|
|
|
|
const (
|
|
VirtualGame GameType = iota
|
|
CityGame
|
|
)
|