online_code/models/entity/submit_basic.go

20 lines
1.4 KiB
Go
Raw Normal View History

2022-05-26 15:40:21 +08:00
package entity
import "online_code/common/types"
// SubmitBasic 提交表
2022-05-26 15:40:21 +08:00
type SubmitBasic struct {
types.BaseDbModel
Identity string `json:"identity" gorm:"column:identity;type:varchar(36);comment:'用户唯一标识'" ` // 唯一标识
ProblemIdentity string `json:"problem_identity" gorm:"column:problem_identity;type:varchar(36);comment:'问题表的唯一标识'" ` // 问题表的唯一标识
ProblemBasic *ProblemBasic `json:"problem_basic" gorm:"foreignKey:ProblemIdentity;comment:'关联问题基础表'" ` // 关联问题基础表
UserIdentity string `json:"user_identity" gorm:"column:user_identity;type:varchar(36);comment:'用户表的唯一标识'" ` // 用户表的唯一标识
UserBasic *UserBasic `json:"user_basic" gorm:"foreignKey:UserIdentity;comment:'联用户基础表'" ` // 关联用户基础表
Path string `json:"path" gorm:"column:path;type:varchar(255);comment:'代码存放路径'" ` // 代码存放路径
Status int `json:"status" gorm:"column:status;type:tinyint(1);comment:'状态'" ` // 【-1-待判断1-答案正确2-答案错误3-运行超时4-运行超内存, 5-编译错误】
2022-05-26 15:40:21 +08:00
}
func (table *SubmitBasic) TableName() string {
return "submit_basic"
}