model

package
v0.0.0-...-9a4634b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 17, 2022 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Answer

type Answer struct {
	UUID                uuid.UUID `gorm:"type:uuid;primary_key;" json:"UUID"`
	StationID           int       `json:"station" gorm:"references:station.ID"`
	AnswerTime          time.Time `json:"answer_time"`
	SynchronizationTime time.Time `json:"synchronization_time"`
	ResultOption        *int      `json:"result_option"`
	ResultText          *string   `json:"result_text"`
	ResultNumber        *float64  `json:"result_number"`
}

func (*Answer) BeforeCreate

func (answer *Answer) BeforeCreate(db *gorm.DB) error

BeforeCreate will set a UUID rather than numeric ID. taken from https://github.com/FachschaftMathPhysInfo/ostseee/blob/master/server/go/model_base.go

type Device

type Device struct {
	ID              string  `json:"ID"`
	TeamID          int     `json:"team" gorm:"references:team.ID"`
	Brand           *string `json:"brand"`
	PhoneModel      *string `json:"phone_model"`
	AndroidCodename *string `json:"android_codename"`
	AndroidRelease  *string `json:"android_release"`
}

type Station

type Station struct {
	ID          int     `json:"ID"`
	Points      int     `json:"points"`
	StationType int     `json:"station_type"`
	Coordinates *string `json:"coordinates"`
	GridSquare  *string `json:"grid_square"`
	Title       *string `json:"title"`
}

type Team

type Team struct {
	ID       int     `json:"ID"`
	Authcode string  `json:"authcode"`
	Name     *string `json:"name"`
	Hometown *string `json:"hometown"`
	Members  *int    `json:"members"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL