nquest/pkg/models/task.go
2024-01-28 19:19:41 +00:00

24 lines
427 B
Go

package models
import (
"github.com/google/uuid"
)
type Task struct {
ID uuid.UUID `gorm:"primarykey" json:"id"`
Title string
Text string
MaxTime int
GameID uuid.UUID
Codes []*Code `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
TaskOrder uint
}
type Code struct {
ID uuid.UUID `gorm:"primarykey" json:"id"`
TaskID uuid.UUID
Code string `gorm:"index"`
Description string
}