2022-05-25 17:30:46 +08:00
|
|
|
package entity
|
|
|
|
|
|
|
|
import (
|
|
|
|
"online_code/common/types"
|
|
|
|
)
|
|
|
|
|
2022-05-26 00:39:39 +08:00
|
|
|
// ProblemCategory 问题分类关联表
|
2022-05-25 17:30:46 +08:00
|
|
|
type ProblemCategory struct {
|
|
|
|
types.BaseDbModel
|
2022-05-26 23:53:18 +08:00
|
|
|
ProblemId uint `json:"problem_id" gorm:"column:problem_id;type:int(11);comment:'问题的ID'" ` // 问题的ID
|
|
|
|
CategoryId uint `json:"category_id" gorm:"column:category_id;type:int(11);comment:'分类的ID'" ` // 分类的ID
|
|
|
|
CategoryBasic *CategoryBasic `json:"category_basic" gorm:"foreignKey:CategoryId;comment:'关联分类的基础信息表'" ` // 关联分类的基础信息表
|
2022-05-25 17:30:46 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
func (table *ProblemCategory) TableName() string {
|
|
|
|
return "problem_category"
|
|
|
|
}
|