25 lines
367 B
Go
25 lines
367 B
Go
package models
|
|
|
|
import (
|
|
"strconv"
|
|
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
type Benchmark struct {
|
|
gorm.Model
|
|
Name string
|
|
ScoringType string
|
|
Description string
|
|
|
|
// many-to-many test
|
|
Tests []Test `gorm:"many2many:tests_benchmarks;"`
|
|
|
|
// has many results
|
|
Results []Result
|
|
}
|
|
|
|
func (b *Benchmark) StringID() string {
|
|
return strconv.Itoa(int(b.ID))
|
|
}
|