fix: remove legacy knowledge card tables and compatibility code
This commit is contained in:
@@ -90,66 +90,38 @@ type ScenarioRule struct {
|
||||
|
||||
type SOP struct {
|
||||
Base
|
||||
TenantID uint64 `json:"tenant_id" gorm:"not null;index"`
|
||||
ScenarioID uint64 `json:"scenario_id" gorm:"not null;index"`
|
||||
Name string `json:"name" gorm:"size:128;not null"`
|
||||
Description string `json:"description" gorm:"type:text;not null"`
|
||||
Status string `json:"status" gorm:"size:24;not null"`
|
||||
CreatedBy uint64 `json:"created_by" gorm:"not null"`
|
||||
}
|
||||
|
||||
type SOPVersion struct {
|
||||
Base
|
||||
TenantID uint64 `json:"tenant_id" gorm:"not null;index"`
|
||||
SOPID uint64 `json:"sop_id" gorm:"not null;index"`
|
||||
Version int `json:"version" gorm:"not null"`
|
||||
Status string `json:"status" gorm:"size:24;not null"`
|
||||
StartNodeKey string `json:"start_node_key" gorm:"size:64;not null"`
|
||||
PublishedAt *time.Time `json:"published_at"`
|
||||
CreatedBy uint64 `json:"created_by" gorm:"not null"`
|
||||
TenantID uint64 `json:"tenant_id" gorm:"not null;index"`
|
||||
ScenarioID uint64 `json:"scenario_id" gorm:"not null;index"`
|
||||
Name string `json:"name" gorm:"size:128;not null"`
|
||||
Description string `json:"description" gorm:"type:text;not null"`
|
||||
Status string `json:"status" gorm:"size:24;not null"`
|
||||
CreatedBy uint64 `json:"created_by" gorm:"not null"`
|
||||
StartNodeKey string `json:"start_node_key" gorm:"size:64;not null"`
|
||||
}
|
||||
|
||||
type SOPNode struct {
|
||||
Base
|
||||
TenantID uint64 `json:"tenant_id" gorm:"not null;index"`
|
||||
SOPVersionID uint64 `json:"sop_version_id" gorm:"not null;index"`
|
||||
NodeKey string `json:"node_key" gorm:"size:64;not null"`
|
||||
Type string `json:"type" gorm:"size:32;not null"`
|
||||
Title string `json:"title" gorm:"size:128;not null"`
|
||||
Content string `json:"content" gorm:"type:text;not null"`
|
||||
Config datatypes.JSON `json:"config" gorm:"type:json;not null"`
|
||||
PositionX int `json:"position_x" gorm:"not null"`
|
||||
PositionY int `json:"position_y" gorm:"not null"`
|
||||
TenantID uint64 `json:"tenant_id" gorm:"not null;index"`
|
||||
SOPID uint64 `json:"sop_id" gorm:"not null;index"`
|
||||
NodeKey string `json:"node_key" gorm:"size:64;not null"`
|
||||
Type string `json:"type" gorm:"size:32;not null"`
|
||||
Title string `json:"title" gorm:"size:128;not null"`
|
||||
Content string `json:"content" gorm:"type:text;not null"`
|
||||
Config datatypes.JSON `json:"config" gorm:"type:json;not null"`
|
||||
PositionX int `json:"position_x" gorm:"not null"`
|
||||
PositionY int `json:"position_y" gorm:"not null"`
|
||||
}
|
||||
|
||||
type SOPEdge struct {
|
||||
Base
|
||||
TenantID uint64 `json:"tenant_id" gorm:"not null;index"`
|
||||
SOPVersionID uint64 `json:"sop_version_id" gorm:"not null;index"`
|
||||
SOPID uint64 `json:"sop_id" gorm:"not null;index"`
|
||||
SourceNodeKey string `json:"source_node_key" gorm:"size:64;not null"`
|
||||
TargetNodeKey string `json:"target_node_key" gorm:"size:64;not null"`
|
||||
Condition datatypes.JSON `json:"condition" gorm:"type:json;not null"`
|
||||
Priority int `json:"priority" gorm:"not null"`
|
||||
}
|
||||
|
||||
type KnowledgeCard struct {
|
||||
Base
|
||||
TenantID uint64 `json:"tenant_id" gorm:"not null;index"`
|
||||
ScenarioID uint64 `json:"scenario_id" gorm:"not null;index"`
|
||||
Title string `json:"title" gorm:"size:128;not null"`
|
||||
Status string `json:"status" gorm:"size:24;not null"`
|
||||
CreatedBy uint64 `json:"created_by" gorm:"not null"`
|
||||
}
|
||||
|
||||
type KnowledgeCardVersion struct {
|
||||
Base
|
||||
TenantID uint64 `json:"tenant_id" gorm:"not null;index"`
|
||||
KnowledgeCardID uint64 `json:"knowledge_card_id" gorm:"not null;index"`
|
||||
Version int `json:"version" gorm:"not null"`
|
||||
Content datatypes.JSON `json:"content" gorm:"type:json;not null"`
|
||||
Status string `json:"status" gorm:"size:24;not null"`
|
||||
}
|
||||
|
||||
type KnowledgeItem struct {
|
||||
Base
|
||||
TenantID uint64 `json:"tenant_id" gorm:"not null;index"`
|
||||
@@ -177,7 +149,6 @@ type SOPRun struct {
|
||||
Base
|
||||
TenantID uint64 `json:"tenant_id" gorm:"not null;index"`
|
||||
SOPID uint64 `json:"sop_id" gorm:"not null;index"`
|
||||
SOPVersionID uint64 `json:"sop_version_id" gorm:"not null;index"`
|
||||
OperatorID uint64 `json:"operator_id" gorm:"not null;index"`
|
||||
ExternalRef string `json:"external_ref" gorm:"size:191;not null;index"`
|
||||
CurrentNodeKey string `json:"current_node_key" gorm:"size:64;not null"`
|
||||
|
||||
Reference in New Issue
Block a user