dbmodel

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: CC-BY-4.0, MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Estimate

type Estimate struct {
	gorm.Model
	ForecastID    uint
	Created       time.Time
	Reason        string
	Probabilities []Probability
	BrierScore    *float64
}

type Forecast

type Forecast struct {
	gorm.Model
	Title       string
	Description string
	Created     time.Time
	Resolves    time.Time
	Closes      *time.Time
	Resolution  Resolution
	Estimates   []Estimate
}

type Outcome

type Outcome struct {
	gorm.Model
	Probabilities []Probability
	Text          string
	Correct       bool
}

type Probability

type Probability struct {
	gorm.Model
	EstimateID uint
	Value      int
	Outcome    Outcome
	OutcomeID  uint
}

type Resolution

type Resolution string
const (
	ResolutionResolved      Resolution = "RESOLVED"
	ResolutionNotApplicable Resolution = "NOT_APPLICABLE"
	ResolutionUnresolved    Resolution = "UNRESOLVED"
)

func (Resolution) IsValid

func (e Resolution) IsValid() bool

func (Resolution) String

func (e Resolution) String() string

Jump to

Keyboard shortcuts

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