实现GetPlanByID
This commit is contained in:
@@ -58,9 +58,10 @@ func (Plan) TableName() string {
|
||||
type SubPlan struct {
|
||||
gorm.Model
|
||||
|
||||
ParentPlanID uint `gorm:"not null;index" json:"parent_plan_id"` // 父计划的ID
|
||||
ChildPlanID uint `gorm:"not null;index" json:"child_plan_id"` // 子计划的ID (它本身也是一个 Plan)
|
||||
Order int `gorm:"not null" json:"order"` // 在父计划中的执行顺序
|
||||
ParentPlanID uint `gorm:"not null;index" json:"parent_plan_id"` // 父计划的ID
|
||||
ChildPlanID uint `gorm:"not null;index" json:"child_plan_id"` // 子计划的ID (它本身也是一个 Plan)
|
||||
Order int `gorm:"not null" json:"order"` // 在父计划中的执行顺序
|
||||
ChildPlan *Plan `gorm:"-" json:"child_plan"` // 完整子计划数据,仅内存中
|
||||
}
|
||||
|
||||
// TableName 自定义 GORM 使用的数据库表名
|
||||
|
||||
Reference in New Issue
Block a user