2022-10-04 15:31:07 +08:00
|
|
|
package model
|
|
|
|
|
|
|
|
import "gorm.io/gorm"
|
|
|
|
|
|
|
|
type Submission struct {
|
2022-10-22 17:38:39 +08:00
|
|
|
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"`
|
2022-10-04 15:31:07 +08:00
|
|
|
}
|