You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
1.4 KiB
25 lines
1.4 KiB
1 year ago
|
package entities
|
||
|
|
||
|
import (
|
||
|
"gorm.io/gorm"
|
||
|
"time"
|
||
|
)
|
||
|
|
||
|
// FeatureContentChapter 栏目内容章回表
|
||
|
type FeatureContentChapter struct {
|
||
|
ID uint `json:"id" xml:"id" gorm:"primaryKey;not null;comment:章回编号"`
|
||
|
PID *uint `json:"pid" xml:"pid" gorm:"comment:上级章回编号"`
|
||
|
FeatureID uint `json:"feature_id" xml:"feature_id" gorm:"comment:所属栏目编号"`
|
||
|
ContentID uint `json:"content_id" xml:"content_id" gorm:"comment:所属内容编号"`
|
||
|
Title string `json:"title" xml:"title" gorm:"size:100;not null;comment:章回标题"`
|
||
|
Intro string `json:"intro" xml:"intro" gorm:"size:250;comment:章回描述"`
|
||
|
Sort int32 `json:"sort" xml:"sort" gorm:"size:4;default:0;comment:排序"`
|
||
|
Version int `json:"-" xml:"-" gorm:"comment:乐观锁"`
|
||
|
CreatedAt time.Time `json:"create_time" xml:"create_time" gorm:"<-:false;comment:创建时间"`
|
||
|
UpdatedAt time.Time `json:"update_time" xml:"update_time" gorm:"<-:false;comment:更新时间"`
|
||
|
DeletedAt gorm.DeletedAt `json:"delete_time" xml:"delete_time" gorm:"comment:删除时间"`
|
||
|
|
||
|
Details []FeatureContentDetail `json:"details" xml:"details" gorm:"foreignKey:ChapterID"`
|
||
|
Children []*FeatureContentChapter `json:"children" xml:"children" gorm:"foreignKey:PID"`
|
||
|
}
|