18 lines
664 B
Go
18 lines
664 B
Go
package entity
|
|
|
|
import (
|
|
"online_code/common/types"
|
|
)
|
|
|
|
// ProblemCategory 问题分类表
|
|
type ProblemCategory struct {
|
|
types.BaseDbModel
|
|
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 *Category `json:"category_basic" gorm:"foreignKey:id;references:category_id;comment:'关联分类的基础信息表'" ` // 关联分类的基础信息表
|
|
}
|
|
|
|
func (table *ProblemCategory) TableName() string {
|
|
return "problem_category"
|
|
}
|