woj-server/internal/model/Submission.go

14 lines
448 B
Go
Raw Normal View History

package model
import "gorm.io/gorm"
type Submission struct {
gorm.Model `json:"meta"`
2023-12-23 15:37:46 +08:00
ProblemID uint `json:"-" gorm:"not null;index"`
Problem Problem `json:"problem" gorm:"foreignKey:ProblemID"`
UserID uint `json:"-" gorm:"not null;index"`
User User `json:"user" gorm:"foreignKey:UserID"`
Language string `json:"language" gorm:"not null"`
Code string `json:"code" gorm:"not null"`
}