25 lines
463 B
Go
25 lines
463 B
Go
package models
|
|
|
|
import "time"
|
|
|
|
type TestingStrategy int32
|
|
|
|
const (
|
|
EachTestTS TestingStrategy = 1;
|
|
CompleteGroupTS TestingStrategy = 2;
|
|
)
|
|
|
|
type Testgroup struct {
|
|
Id *int32 `db:"id"`
|
|
ProblemId *int32 `db:"problem_id"`
|
|
TestingStrategy *int32 `db:"testing_strategy"`
|
|
}
|
|
|
|
func (TestingStrategy ts) Valid() error {
|
|
switch ts {
|
|
case EachTestTS, CompleteGroupTS:
|
|
return nil
|
|
}
|
|
return lib.ErrBadTestingStrategy
|
|
}
|