package entities import ( "gorm.io/gorm" "gorm.io/plugin/optimisticlock" "time" ) // FeatureContentChapter 栏目内容章回表 type FeatureContentChapter struct { ID uint `json:"id" xml:"id" gorm:"primaryKey;not null;comment:章回编号"` PID *uint `json:"pid" xml:"pid" gorm:"column:pid;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 optimisticlock.Version `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:"-" xml:"-" gorm:"comment:删除时间"` Details []FeatureContentDetail `json:"details" xml:"details" gorm:"foreignKey:ChapterID"` Children []*FeatureContentChapter `json:"children" xml:"children" gorm:"foreignKey:PID"` }